C# getting its own class name

c#, reflection

Solution

Try this:

this.GetType().Name

Problem

If I have a class called `MyProgram`, is there a way of retrieving "MyProgram" as a string?

Original source