Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange method call
Message
From
09/03/2014 16:02:47
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01595999
Message ID:
01596000
Views:
63
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>In the VC# article http://social.technet.microsoft.com/wiki/contents/articles/23110.overload-resolution-revisited-in-net-4-5.aspx I see the following call:
>
ExampleMethod(p2: "");
>I never saw that syntax before - can you please explain it to me?
>Thanks in advance.


It's a feature derived from Visual Basic, called a named parameter. It allows you to pass parameters which are out of order, and to instruct the compiler which parameter each one is:

See: http://www.dotnetperls.com/named-parameters
See: http://msdn.microsoft.com/en-us/library/dd264739.aspx

In this case, the parameter is named "p2" and you are passing it an empty string.
Previous
Reply
Map
View

Click here to load this message in the networking platform