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; }
}
}
2 comments:
Great Article
C# Training in Chennai | C# Online Training | ASP.NET Training in Chennai
C# Training in Chennai | Dot Net Training in Chennai | Dot Net Training in Chennai
Great Article
IEEE Projects for Engineering Students
Final Year Projects for CSE
Post a Comment