|
|
Q.1 What’s the difference between an interface and abstract class? Modify answer Delete (after enough votes question will be removed)
In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.
Q.2 What happens in memory when you Box and Unbox a value-type? Modify answer Delete (after enough votes question will be removed)
Boxing converts a value-type to a reference-type, thus storing the object on the heap. Unboxing converts a reference-type to a value-type, thus storing the value on the stack.
|