What is boxing and unboxing?
Boxing: Converting of Stack based values into the Heap
Based values i.e coverting of a value type to a reference
type is the Boxing.
int i = 10;
object obj = i; // boxing
int j = (int)obj; // unboxing
UnBoxing is vice versa.
Difference between managed & unmanaged code ?
A code that executed under the instructions of CLR is called
managed code.
A code that execute without the instruction of CLR is called
unmanaged code
What is strong name in .net ?
strong name is a cryptographic signature, a reliable .NET assembly identifier,
comprised of the assembly’s simple text name, version
number, culture, public key and a digital signature.
Command create a strong name.
sn -k Testkey.snk
now in AssemblyInfo.cs we can have
[assembly: AssemblyKeyFileAttribute("TestKey.snk")]
Early binding & Late binding in .net ?
Early binding
compile time binding, compiler have knowledge about objects.
Example : var obj = new Student();
Late binding
Run time binding, compiler doesn't have knowledge about objects.
Example : var obj;
obj = genricObj.GetType();