| Where is version information stored of an assembly? | ||
Version information is stored in assembly in manifest. | ||
| Is versioning applicable to private assemblies? | ||
Versioning concept is only applicable to global assembly cache (GAC) as private assembly lie in their individual folders. | ||
| What is GAC? | ||
GAC (Global Assembly Cache) is used where shared .NET assembly reside. GAC is used in the following situations If the application has to be shared among several application If the assembly has some special security requirements like only administrators can remove the assembly. If the assembly is private then a simple delete of assembly file will remove the assembly. | ||
| What is the concept of strong names? | ||
Strong Name is only needed when we need to deploy assembly in GAC. Strong Names helps GAC to differentiate between two versions. Strong names use public key cryptography (PKC) to ensure that no one can spoof it. | ||
| How to add and Remove an assembly from GAC? | ||
There are two ways to install .NET assembly in GAC. Using Microsoft Installer Package Using Gacutil | ||
| What is Delay signing? | ||
During development process you will need strong name keys to be exposed to developer which is not a good practice from security aspect point of view. In such situations you can assign the key later on and during development you can use delay signing. | ||
| What is Garbage Collection? | ||
Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding. CLR automatically releases objects when they are no longer in use and referenced. CLR runs on non-deterministic to see the unused objects and cleans them. One side effect of this non-deterministic feature is that we cannot assume an object is destroyed when it goes out of the scope of a function. Therefore, we should not put code into a class destructo to release resources. | ||
| Can we force garbage collector to run? | ||
System.GC.Collect() forces garbage collector to run. This is not recommended but can be used if situations arises. | ||
| What is Reflection? | ||
All .NET assemblies have metadata information stored about the types defined in modules. This metadata information can be accessed by mechanism called as "Reflection". System.Reflection can be used to browse through the metedata information. Using reflection you can also dynamically invoke methods using System.Type.Invokemember. | ||
| What are different types of JIT? | ||
|