If you are inside the class method, and don’t have access to an instance of the object, use:
MethodBase.GetCurrentMethod().DeclaringType.FullName;
If you hava access to an instance of the object, then:
public static class SomeClass
{
public static string FullName
{
get { return typeof(SomeClass).FullName; }
}
}
No comments:
Post a Comment