10
shouts

C# 4.0 new features: Named and Optional arguments

published 132 days, 14 hours, 14 minutes ago posted by kcherupakcherupa 133 days, 2 hours, 10 minutes ago
Friday, November 06, 2009 8:00:38 PM GMT Friday, November 06, 2009 8:04:25 AM GMT

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...

category: Foundation | clicked: 33 | | source: cherupally.blogspot.com | show counter code
tags: .Net 4.0, C# 4.0, Named Parameters, New Feature, Optional Parameters