C# getting its own class name
Try this:
this.GetType().Name
I wanted to throw this up for good measure. I think the way @micahtan posted is preferred.
typeof(MyProgram).Name
With C# 6.0, you can use the nameof
operator:
nameof(MyProgram)
Try this:
this.GetType().Name
I wanted to throw this up for good measure. I think the way @micahtan posted is preferred.
typeof(MyProgram).Name
With C# 6.0, you can use the nameof
operator:
nameof(MyProgram)