string msg = string.Format("{0}.{1}.{2} was set!", nameof(Foo), nameof(Bar), nameof(ShouldThrow));
throw new System.Exception(msg);
Console.WriteLine("{0}.{1}.{2}() ran without {0}.{1}.{3} being set!\n", nameof(Foo), nameof(Bar), nameof(Test), nameof(ShouldThrow));
public static void Main()
Foo.Bar bar = new Foo.Bar();
catch(System.Exception e)
Console.WriteLine("Exception: {0}\n{1}", e.Message, e.StackTrace);