How to get the object name only? (without the full namespace etc.)

  • Thread starter Thread starter ORC
  • Start date Start date
O

ORC

If I do this:
MyClass.ToString();
I e.g. get this:
MyApplication.Form1+MyClass

But how do I get the name of myclass alone?

Thanks
Ole
 
ORC said:
If I do this:
MyClass.ToString();
I e.g. get this:
MyApplication.Form1+MyClass

But how do I get the name of myclass alone?

Do you mean the object name (in which case there is no such thing) or
the type name? Note that the type name here is Form1+MyClass, as it's a
nested class.
 
Back
Top