Converting from an interface to an object that implements the interface?
<p>I have an interface which is implemented by several different objects.  What I am trying to do is write a method in c# that will accept the interface object as a parameter and convert this parameter to an object that it implements so i don't have to write the same function for several different types.  Such as:</p>

<p>Class UnappliedCashDetails implements interface ITransactionDetail.</p>

<p>Constructor for ISSBatch:
<pre><code>public ISSBatch(List<code>&lt;ITransactionDetail&gt;</code> details)</p>

<p>public static ISSBatch GetNextReceiptBatch()
{
     List<code>&lt;UnappliedCashDetail&gt;</code> details = new List<code>&lt;UnappliedCashDetail&gt;</code>();</p>

<pre><code>    /`*`some code here to populate my list`*`/            

    return = new ISSBatch(details);
</code></pre>

<p>}</p>

<p></pre></code></p>

<p>C# does not like this.  Am i trying to use the interface wrong or just not casting correctly?</p>

<p>Thanks!</p>
