" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

How to minimize the Method Overloading in C# 4.0

Posted on November 23rd, 2015 by Chinmayi Samal

We can avoid creating many overloads of a method by specifing default values for some parameters. public static void EmployeeDetails(int empId, string address=”BBSR”, double salary=15000) { } static void Main(string[] args) { EmployeeDetails(1); EmployeeDetails(1, “Cuttack”); EmployeeDetails(1, “Cuttack”, 20000); }   In the above Example there is a method called EmployeeDetails which has 3 parameters including […]

New Features in C# 4.0

Posted on November 23rd, 2015 by Kshirodra Meher

Introduction- The major aim of C# 4.0 is dynamic programming.More importantly objects are dynamic and there behaviour and properties are not accessed by a static type. Followings are some example – 1. objects from dynamic programming languages 2. ordinary .NET types accessed through reflection 3. objects with changing structure, such as HTML DOM script objects […]