title: Getting a type of of object in C#
body: <p>in my Winform project, I am using  treeview tag for holding the objects, there are multiple type of objects are stored in treeview.tag and while trying to get the type it is not giving exact type, instead of class name it is giving a long name with some proxy keyword (unlike namespace + class name).</p>
  
  <p>Is there any method to get the actual object type from the tag object</p>
  
  <pre><code>var tag= e.Node.Tag;
  Type gettype=tag.GetType
  //MessageBox.Show(gettype.ToString());          
  if (gettype.Equals(typeof(Product)))
  {
      var product = (Product)e.Node.Tag;
      //            
  }
  if (gettype.Equals(typeof(Category)))
  {
     var caegory= (Category)e.Node.Tag;
   //            
   }
  </code></pre>