title: Checking if the object is of same type
body: <p>Hello I need to know how to check if the object of the same type in C#.<br/></p>
  
  <p>Scenario:</p>
  
  <pre><code>class Base_Data{}
  
  class Person : Base_Data { }
  class Phone  : Base_data { }
  
  class AnotherClass
  {
     public void CheckObject(Base_Data data)
     {
           if (data.Equals(Person.GetType()))
           { //&lt;-- Visual Studio 2010 gives me error, says that I am using 'Person' is a type and not a variable.
  
          }
      }
  }
  </code></pre>