Call a particular function (function pointer) on an object
<p>If I have a function pointer</p>

<pre><code>MyFunctionPointer myFunctionPointer;
</code></pre>

<p>I can pass it parameters like:</p>

<pre><code>myFunctionPointer(1,2);
</code></pre>

<p>I am looking to do something similar, but call a particular function on an object. I currently have something like this:</p>

<pre><code>if(case1)
  myObject.Case1();
else if(case2)
  myObject.Case2();
</code></pre>

<p>Instead, is there any way to do something like:</p>

<pre><code>  myObject.myFunctionPointer();
</code></pre>

<p>?</p>

<p>Thanks,</p>

<p>David</p>
