public static void Main()
Console.WriteLine(" -- No Arguments --");
MethodWithDefaultArguments();
Console.WriteLine(" -- Arguments in order --");
MethodWithDefaultArguments(null, "sup");
Console.WriteLine(" -- Named arguments --");
MethodWithDefaultArguments(thing: "New");
public static void MethodWithDefaultArguments(object obj = null, string str = null, string thing = "Default")
Console.WriteLine("obj: Passed " + (obj != null ? "an object" : "null :("));
Console.WriteLine("str: Passed " + (obj != null ? str : "null :("));
Console.WriteLine("thing: Passed " + (thing != null ? "an object" : "null :("));