optional paramater c# 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*/}