What are Value types and Reference types? | ||
Value types directly contain their data which are either allocated on the stack or allocated in-line in a structure. Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types,pointer types, or interface types. Variables that are value types each have their own copy of the data, and therfore operations on one variable do not affect other variables. Variables that are reference types can refer to the same object;therfore, operations on one variable can affect the same object referred to by another variable. All types derive from the System.Object base type. | ||
What is Boxing and Unboxing? | ||
| ||
What is the difference between VB.NET and c#? | ||
| ||
What is the diference between System exceptions and Application exceptions? | ||
All exception derives from Exception Base class. Exceptions can be generated programmatically or can be generated by system. Application Exception serves as the base class for all application-specific exception classes. It derives from Exception but does not provide any extended functionality. You should derive your custom application exceptions from Application Exception. Application exception is used when we want to define user defined exception, while system exception is all which is defined by .NET. | ||
What is Code Access Security? | ||
CAS is part of .NET security model that determines whether or not a piece of code is allowed to run and what resources it can use while running. Example CAS will allow an application to read but not to write and delete a file or a resource from a folder. | ||
How to prevent my .NET DLL to be decompiled? | ||
By design .NET embeds rich Meta data inside the executable code using MSIL. Any one can easily decompile your DLL back using tools like ILDASM (owned by Microsoft) or Reflector for .NET which is a third party. Secondly there are many third party tools which make this decompiling process a click away. So any one can easily look into your assemblies and reverse engineer them back into actual source code and unserstand some real good logic which can make it easy to crack your application. The Process by which you can stop this reverse engineering is using "obfuscation". It is a technique which will foil the decompilers. There are many third parties (XenoCode,Demeanor for .NET) which provide .NET obfuscation solution. Microsoft includes one that is Dotfuscator Community Edition with Visual Studio.NET. | ||
What is the difference between Convert.toString and .toString() method? | ||
For Easy understanding see below code. int i = 0; MessageBox.Show(i.ToString()); MessageBox.Show(Convert.ToString(i)); The basic difference between them is "Convert" function handles NULLS while "i.ToString()" does not it will throw a NULL reference exception error. So as good coding practice using "convert" is always safe. | ||
What is Native Image Generator(Ngen.exe)? | ||
The Native Image Generator utility (Ngen.exe) allows you to run the JIT compiler on your assembly's MSIL and generate native machine code which is cached to disk. After the image is created .NET runtime will use the image to run the code rather than from the hard disk. Running Ngen.exe on an assembly potentially allows the assembly to load and execute faster, because it restores code and data stuctures fom the native image cache rather than generating them dynamically. | ||
What is CodeDom? | ||
"CodeDom" is an object model which represents actually a source code. It is designed to be language independent - once you create a "CodeDom" hierarchy for a program we can then generate the source code in any .NET compliant language. | ||
What is Satellite Assembly? | ||
Satellite assemblies, are assembly files (.dll) that contain localized resources for an application. Each satellite assembly file contains the resources for one culture. An application can have many satellite assemblies, depending on how many cultures the application supports. |