Link Details

Link 908703 thumbnail
User 210593 avatar

By BlackWasp
via blackwasp.co.uk
Published: Jan 19 2013 / 10:41

C# optional parameters provide a handy way to create methods that can be called with a varying number of arguments but without the need to create overloaded versions. However, the way that they are used in referenced libraries can cause problems.
  • 9
  • 0
  • 1001
  • 1010

Comments

Add your comment
User 210593 avatar

BlackWasp replied ago:

0 votes Vote down Vote up Reply

They were introduced in .NET 4.0 to minimise the need to use overloads. I wrote about them at http://www.blackwasp.co.uk/CSharpOptionalParameters.aspx.

User 265881 avatar

Topnotch replied ago:

0 votes Vote down Vote up Reply

@BlackWasp, Afrina_Teuku is not actually interested in the question or the answer, they are instead interested in posting large amounts of spam. Just a quick look at their profile and related comment history confirms this.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)



    Spring Integration
    Written by: Soby Chacko
    Featured Refcardz: Top Refcardz:
    1. Search Patterns
    2. Python
    3. C++
    4. Design Patterns
    5. OO JS
    1. PhoneGap
    2. Spring Integration
    3. Regex
    4. Git
    5. Java