How to Get the Name of an Object’s Type (Class) in C#

string name = instanceVariable.GetType().Name;

You must be logged in to post a comment.