Beginner’s Guide to Value and Reference Types in C#

Value Type: Built in types such as int(all numeric types),char,bool etc.. would come under value type. Custom struct and enum would also fall into this category. Value types exhibit following characteristics. Actual Value(s) gets copied when a variable  is assigned to another variable and there is no relationship between two variables after the assignment statement Consider the following code block …

Adding methods to existing classes in C#

There are many times when we might want to add functionality to existing code. The existing code could be the classes written by  fellow developers in our team or it could be third party code that we might want to use. The obvious choice is to create a new class by inheriting the existing class and add functionality to this …