title: How to access the properties of an instance of a derived class which is passed as a parameter in the form of the base class
body: <p>In C# I have a base class and a derived class.</p>
  
  <p>I have a function which has the base class as an input parameter</p>
  
  <pre><code>public void SomeFunction(BaseClass InstanceOfDerivedClass)
  </code></pre>
  
  <p>Is there a way I can access the properties specific to the derived class, even though it has been passed as a base class? Could I use GetType or Cast or something like that?</p>
  
  <p>I appreciate that the solutions may not be elegant but at the moment the alternative is to repeat this function many times for the different derived classes.</p>