How to

get class name

Published: 14. October 2011 | Updated: 14. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Reflection
Tags: C# Debug Reflection
Was this snippet helpful for you? YESYES / NONO
var obj = new MyClass();
var name = obj.GetType().Name;

Console.WriteLine(name);
Console Output:
MyClass
Send us feedback about this snippet »



Related Snippets: