title: Declare a dictionary inside a static class
body: <p>How to declare a static dictionary object inside a static class? I tried</p>
  
  <pre><code>public static class ErrorCode
  {
      public const IDictionary&lt;string, string&gt; ErrorCodeDic = new Dictionary&lt;string, string&gt;()
      {
          { "1", "User name or password problem" }     
      };
  }
  </code></pre>
  
  <p>But the compiler complains that "<em>A const field of a reference type other than string can only be initialized with null</em>". </p>