How do I get the type (not of a class but that) of an instance of class
- by Richard77
Hello,
To get the type of a class called myClass I do this
Type myType = (typeof(myClass))
How about, instead of having myClass, I've rather the instanceOfMyClass? How do I get the type?
Let's say I've this
Contact contact = new Contact();
If I want to know which type is contact, how do I do it
Thanks for helping