Can I extend a base class and cast the base to the extension
<p>I have write this code:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Net.Mail;
using System.Net;

public partial class Test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Foo m_oFoo = new Foo() { 
            S1 = "N"
        };

        List&lt;Foo&gt; m_List = new List&lt;Foo&gt;();
        m_List.Add(m_oFoo);

        IFoo m_oIFoo = (IFoo)m_List[0];
        m_oIFoo.S2 = "C";

        Response.Write(m_oIFoo.S1);
        Response.Write(m_oIFoo.S2);
    }
}

public class Foo
{
    public string S1 { get; set; }
    public Foo()
    {

    }
}

public class IFoo: Foo
{
    public string S2 { get; set; }
    public IFoo(){}
}
</code></pre>

<p>But the compiler say's "Unable to cast object of type 'Foo' on type 'IFoo'."
How I can Cast Foo to Foo1 without declare a caster with all Foo methods because this is an example, Foo has more than 100 methods.</p>

<p>thanks for the help</p>
