One of my career goals as a developer is to work for Microsoft, now that I have graduated school and have 2 years of development experience I am going to start actively perusing this goal. The word on the street is that the interview process for Microsoft positions is not easy. To prep for interviews I am trolling the web looking for possible interview questions and posting my answers. To start off I found these general questions on C#.
Metadata describes every type and member defined in your code in a language-neutral manner. It stores the description of the assembly, description of types, and the attributes
Each metadata table holds information about the elements of your program. For example, one metadata table describes the classes in your code, another table describes the fields, and so on. If you have ten classes in your code, the class table will have tens rows, one for each class. Metadata tables reference other tables and heaps. For example, the metadata table for classes references the table for methods.
Two basic kinds of types are value types and reference types.
Boxing a value type packages it inside an instance of the Object reference type, unboxing is the reverse.
System.Object
Namespace declares a scope that lets you organize code and gives you a way to create globally unique types. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality.
The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.
Any data types directly supported by the compiler are called primitive types. Primitive types map directly to types that exist in the base class library.
Reflection allows the inspection of metadata in a PE file and late binding (run time) to types and their members.
A delegate is a type that references a method with the same signature.
Access is limited to current project or types derived from the containing class.
It's simply a class that’s state does not change after it was initialized.
StringBuilder class represents a mutable string of characters. System.String is immutable.
A StringBuilder object is preferable for a concatenation operation if an arbitrary number of strings are concatenated; for example, if a loop concatenates a random number of strings of user input.
No, array objects with the same array type share the same Type object.
CopyTo() is a deep copy that copies the values. Clone() is a shallow copy that copies only the elements of the Array.
System.Collections.Hashtable or System.Collections.Generic.Dictionary, I prefer the Generic Dictionary it is faster.
Yes
No, the order of the catch clauses is important because the catch clauses are examined in order. Catch the more specific exceptions before the less specific ones.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.