c# function optional parameter code example
Example 1: optional arguments c#
public void ExampleMethod(int required,
string optionalstr = "default string",
int optionalint = 10)
Example 2: C# optional arguments
public void SomeMethod(int a, int b = 0){/*some code*/}
Example 3: how to pass an optional parameter in c# mvc asp.net
public ActionResult Index(string Country, int Regions = 2)