C# call method on a member class
<p>I want do something like that:</p>

<pre><code>public class MyClass
{
    public String varA{ get; set; }
    public String[] varB{ get; set; }

    //.....
    public ?? string ToHtml()
    {
        //return HTML value
    }
}

public class Run()
{
    MyClass c = new Myclass();
    c.varA = "Toto";
    c.varB = new string[] { "foo", "bar" };

    string a = c.varA.ToHtml() // -&gt; "&lt;p&gt;Toto&lt;/p&gt;";
    string b = c.varB.ToHtml() // -&gt; "&lt;ul&gt;&lt;li&gt;foo&lt;/li&gt;&lt;li&gt;bar&lt;/li&gt;&lt;/ul&gt;";
}
</code></pre>

<p>How can do that ?</p>

<p>Edit: I have change the Run()</p>
