C# optional parameters

dotnet C#

C# 4.0 allows one to use named and optional parameters.

Example:

One can call the method in multiple ways

Additional note, one cannot provide a gap in arguments.
Example:

Taswar Bhatti Avatar

Written by