How to infer a type in a base class dependant on the inheriting class at runtime without if statements?
<p>I have this little OO problem..</p>

<pre><code>abstract class MyAbstractBaseClass
{    
   MyHelperClassBase myHelperBaseClass;

   protected method foo()
   {
       //QUESTION....... :  when I am here I want to do this...

       myHelperBaseClass = new MyHelperSubClass(); 

       //OR...

       myHelperBaseClass = new MyOtherHelperSubClass();

       //HOWEVER ITS COMPLETELY CONDITIONAL ON THE BASE CLASS
       //HOW DO I MAKE SURE THE CORRECT TYPE IS INSTANTIATED DEPENDANT ON
       //THE BASE CLASS WITHOUT USING AN 'if' STATEMENT?
   }    
}

class MySubClass : MyAbstractClass {}    
class MyOtherSubClass : MyAbstractClass {}    
/////////////

abstract class MyHelperClassBase {}    

class MyHelperSubClass : MyHelperClassBase, IMyHelper {}    
class MyOtherHelperSubClass : MyHelperClassBase, IMyHelper {}
</code></pre>

<p>I want to be able to have a the type basically passed up but cant think of a slick way to do this. Should I just stuck an abstract property on the base class?</p>
