1. how do you box a primitive data type variable?
To pass it by reference.
2. How do you convert a string into an integer in .NET?
Int32.Parse( string)
The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
4. Where do the reference-type variables go in the RAM?
The references go on the stack, while the objects themselves go on the heap.
6. Speaking of Boolean data types, Whats different between C# and /C++?
There's no conversion between 0 and false, as well as any other number and true, like in C/C++.
8. Whats the difference between Struct and class in C#?
Structs cannot be inherited.
Structs are passed by value, not by reference.
Struct is stored on the stack, not the heap.
Explain encapsulation.
The implementation is hidden, the interface is exposed.
9. Whats the access level of the visibility type internal?
Current application.
10. How do you initialize a two-dimensional array that you don't know the dimensions of?
int [ , ] myArray; //declaration
myArray = new int [5, 8]; //actual initialization