title: Does C# have an equivalent of Java static nested class?
body: <p>I am converting Java into C# and have the following code (see <a href="https://stackoverflow.com/questions/1581931/should-i-refactor-static-nested-classes-in-java-into-separate-classes">discussion in Java Context</a> about its use). One approach might be to create a separate file/class but is there a C# idom which preserves the intention in the Java code?</p>
  
  <pre><code>   public class Foo {
  
      // Foo fields and functions
      // ...
          private static class SGroup {
              private static Map&lt;Integer, SGroup&gt; idMap = new HashMap&lt;Integer, SGroup&gt;();
  
              public SGroup(int id, String type) {
      // ...
              }
          }
      }
  </code></pre>