Class-level anonymous types?
<p>Is it possibly to create a class-level anonymous type? Like,</p>

<pre><code>class MyClass {
    readonly var _myAnon = new { Prop = "Hello" };
}
</code></pre>

<p>I'm looking for an easy way to create a dictionary-like structure of constants.</p>

<hr>

<p>Would like to create something like this, but with a bit more type-safety:</p>

<pre><code>    readonly Dictionary&lt;string, dynamic&gt; _selectors = new Dictionary&lt;string, dynamic&gt;
    {
        { "order", new string[] {"ID","NAME","TAG"} },
        { "match", new Dictionary&lt;string, Regex&gt; {
            { "ID", new Regex(@"#((?:[\w\u00c0-\uFFFF-]|\\.)+)") },
            { "CLASS", new Regex(@"\.((?:[\w\u00c0-\uFFFF-]|\\.)+)") },
            { "NAME", new Regex(@"\[name=['""]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['""]*\]") },
            { "ATTR", new Regex(@"\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['""]*)(.*?)\3|)\s*\]") },
            { "TAG", new Regex(@"^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)") },
            { "CHILD", new Regex(@":(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?") },
            { "POS", new Regex(@":(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)") },
            { "PSEUDO", new Regex(@":((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['""]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?") } }
        },
        { "leftMatch", new object() },
        { "attrMap", new Dictionary&lt;string, string&gt; {
            { "class", "className" },
            { "for", "htmlFor" } }
        }
    };
</code></pre>
