Why can't I reference a static member from an inner class in C#?
<p>I have a static class </p>

<pre><code>namespace MyNameSpace{

    public static class MyStaticClass {

        public static string myStaticMember = "";

    }
}
</code></pre>

<p>I can reference myStaticMember in another class like this:</p>

<pre><code>string varString = MyStaticClass.myStaticMember;
</code></pre>

<p>except if MyStaticClass is an inner class of the other class.</p>

<p>Why ?</p>

<p>Update: this is what I'd like to do</p>

<pre><code>using System;

namespace test
{
    public class MyOuterClass
    {


        public static class MyStaticClass
        {

            public static string myStaticMember = "";

        }


        MyStaticClass.myStaticMember = "Hello";


    }
}
</code></pre>
