How to get class name in code as static string property
I want to get something like this:
public class myclass()
{
public static string ClassName { get { return "myclass"; } }
}
Is there a general way to substitude the string "myclass" in the above
code example with the name of the owning class? I know that we can do this
in non static way:
public string ClassName { get { return this.GetType().Name; } }
But in static?
No comments:
Post a Comment