Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# optional parameters

// Using Optional Attribute
private void SomeMethod([Optional] string param)
{
    ...
}

// Using Default Values
private void SomeMethod(string param = null)
{
    ...
}
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #optional #parameters
ADD COMMENT
Topic
Name
6+1 =