Feeds:
Posts
Comments

Archive for the ‘C#’ Category

Response files in C#

When you write any .NET application it will always add some of the assemblies by default. How will this happen? When I think about the probable answer I thought it might be GAC. But when I googled it I found the answer is completely different. The answer is a response file.
 What is a response file [...]

Read Full Post »

The is operator checks whether an object is compatible with a given type, and the result of the evaluation is a Boolean: true or false. The is operator will never throw an exception. The following code demonstrates:
 
Object o = new Object();
            Boolean b1 = (o is Object); // b1 is true.
            Boolean b2 = (o [...]

Read Full Post »

Constants vs Readonly in C#

Constants
A constant is one which has a never changing value. When defining a constant  its  value must be determinable at the compile time. The compiler then saves this information in the metadata of the assembly. Defining a constant causes creation of metadata.You can define the constants for only the CLR primitive types like string,int ,bool,Double [...]

Read Full Post »