Microsoft has introduced few new features in C# 4.0. I would like to discuss the below listed new features in this post. 1. Optional arguments2. Named arguments Optional arguments: This feature allows you to omit arguments when calling methods. This is done by defining a method with assigning default values to parameters. For better understanding, let's take a look at the below example. We define a method called "SomeMethod" by proving default values to two of its parameters as shown. public void Som...
|
10
shouts |
|
|||
No comments yet, be the first one to post comment.