C# Interview Question and Answers
11. |
Define Boxing? |
|
Boxing is the process of creating an instance of the reference type object and assigning the value of a value type to the object as well as storing information on the value's data type. |
|
|
12. |
Define UnBoxing? |
|
Boxing is the process of assigning the value of the boxed objects type to a variable of the appropriate type. |
|
|
13. |
What standard types does C# supply? |
|
C# supports a very similar range of basic types to C++, including - int
- long
- float
- double
- char
- string
- arrays
- structs and
- classes
|
|
|
14. |
What is a static constructor? |
|
A constructor for a class, rather than instances of a class. The static constructor is called when the class is loaded.
|
|
|
15. |
What is type safe? |
|
Type safe is about increasing the opportunities for the compiler to detect your coding errors. If you use interfaces instead of delegates the compiler will have more opportunities to detect your coding errors. |
|
|