Explain the features of C#?
Below are some of the features supported in C# -
What is C-Sharp (C#)?
C# is a type-safe, managed and object oriented language, which is compiled by .Net framework for generating intermediate language (IL).View
What is Code Document Object Model (CodeDom) ?
Code Document Object Model are code generators which are used to minimize repetitive coding tasks, and to minimize the number of human-generated source code lines.View
What is Native Image Generator (Ngen.exe) ?
Ngen.exe creates compiled processor-specific machine code called native images which are files and installs them into the native image cache on the local computer. The runtime will use native images from the cache rather than using the JIT compiler to compile the original assembly.View
How to prevent my .NET DLL to be decompiled ?
We can prevent .NET DLL to be decompiled upto an extent by Obfuscate Source code, asymmetric encryption and encrypted w32 wrapper application.View
What is a satellite assembly?
A satellite assembly are used when multilingual (UI) application are created. Satellite assembly is a compiled library that contains localized resources which provides us with the capability of designing and deploying solutions to multiple cultures, rather than hard coding texts, bitmaps etcView
What is CODE Access security?
CODE Access security is a security model that let us grant or deny execution permissions to an assembly according to its "properties," called evidence, such as its strong name or publisherView
What’s the difference between System exceptions and Application exceptions?
System exceptions are common exceptions thrown by the CLR of .Net Framework. Application exceptions can be user defined exceptions thrown by the application.View
Explain the concept of Boxing and Unboxing ?
Converting a value type to reference type is called Boxing. Converting a reference type to value type is called Unboxing.View
What are Value types and Reference types ?
There are two types of data types in .Net, Value types and Reference types. Value types are stored in stack part of the memory. Reference type are stored in managed heap. Let have a look at the example for better understanding.
Int iCount = 0; \\ Value Type int NewiCount = iCount; \\ Reference TypeView
What are the different type of JIT's ?
Different Types of JIT are
1) Pre-JIT - Complies complete source code into native code at the time of deployment.
2) Econo-JIT - Complies methods that are called at runtime.
3) Normal-JIT - Complies methods that are called at runtime and get stored in cache. Next time when the same method is called, it will be taken from cache.View
What is Delay signing ?
To create a strong named assembly and to make sure that this assembly can used by someone else, we partially build this assembly by providing a Public Key. We write this Public Key in the AssemblyInfo.vb OR .cs file. We also add an attribute by the name <Assembly:AssemblyDelaySignAttribute(true)> to the assembly info file. This makes it sure that when we build the assembly, it would be containing the information only about the public key before we deliver it to our clients. This is a partial strong named assembly that we have created, and hence it is called Delayed Assembly.View
What is Reflection?
Reflection is used to dynamically load a class, create object and invoke methods at runtime. It can also be used to read its own meta data to find assemblies, modules and type information at runtime.View
How to add and remove a assembly from GAC?
To install assembly in Cache, use Gacutil. To run Gacutil, goto "Visual Studio Command Prompt" and type "gacutil -i <assembly_name>", where (assembly_name) is the DLL name of the project. To uninstall assembly, type gacutil –u <assembly name> in Visual Studio Command Prompt.View
Explain the concept of strong names (strong types) ?
While using shared assemblies, in order to avoid name collisions strong names are used. Strong Names are based on private key cryptography, ie. private assemblies are simply given the same name as their main file name.View
What is Global Assembly Cache (GAC) ?
While using shared assemblies, to avoid Assembly being overwritten by a different version of the same assembly, shared assemblies are placed in a special directory subtree of the file system known as the global assembly cache (GAC). Placing shared assemblies can only be done by a special .Net Utilities.View
What is the Difference between NameSpace and Assembly ?
What is NameSpace ?
A namespace is a logical grouping of related classes and types. Every class should have a NameSpace.View
Where is the assembly version information stored ?
In the Manifest.View
How to view Assembly information ?
By using Ildasm.exe, which is an MSIL Disassembler one can view attributes, references to other modules and assemblies.View
© 2017 QuizBucket.org