20 of the top C# language questions answered

I love the C# Language. I enjoy learning the various material out there from the different versions which treats about the language details and intricacies. If you are starting with the language, you might want to try coming with answers to the following questions. Also check the link at the bottom for a great discussion about them, done by Gerry and Paul from Microsoft Virtual Academy.
This training session focuses on 20 of the top questions surrounding the C# language, based on number of views and votes on stackoverflow.”

01. When do we use a Struct versus a Class?
02. How does one parse XML files?
03. What is the difference between String and string?
04. How do I get the application’s path in a C# console app?
05. How do you call a base constructor in C#?
06. How would you count the occurrences of a string within a string?
07. How do you check if a number is a power of 2?
08. What is the difference between break and continue in a loop?
09. What is the difference between abstract and virtual functions?
10.What is the difference between ref and out keywords?
11. Explain how to encrypt/decrypt a string in .NET.
12. How do I get the index of the current iteration of a foreach loop?
13. How do I get my own IP address in C#?
14. How do I calculate someone’s age in C#?
15. How do I get the string value of an enum?
16. How do I make a textbox that only accepts numbers?
17. How do I round a decimal value to two places for output?
18. How do I remove duplicates from an array?
19. How do I sort a dictionary by value?
20. How can I return multiple values from a function in C#?

Struct vs Class

Check Microsoft Virtual Academy and listen to Gerry and Paul discussing and answering those questions in a very practical way.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s