Category Archives: C#

Parameter passing in C#

Many people are confused on how parameters are passed as references specifically for reference types. Jon Skeet has a nice article which clearly explains the differences here. Same concepts explained with more pictures  here

Posted in .NET Framework, C# | Tagged , | Leave a comment

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 … Continue reading

Posted in C# | Leave a comment

C# “is” and “as” operators

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 … Continue reading

Posted in C# | Leave a comment

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 … Continue reading

Posted in C# | Leave a comment