title: Creating class instances at run-time and initializing simultaneously
body: <p>I am attempting following code to create multiple instances of a class at run-time and want to initialize also, but it is giving error:</p>
  
  <blockquote>
    <p>A local variable named 'inum' cannot be declared in this scope because
    it would give a different meaning to 'inum', which is already used in
    a 'parent or current' scope to denote something else.</p>
  </blockquote>
  
  <pre><code>public class MyClass
  {
      static int i=0;
  
      class A
      {
          public A()
          { 
  
          }
      }
  
      public static void Run()
      {
          string inum = "i";
          for (int j=1;j&lt;=5;j++)
          {
              inum = inum + j.ToString();
              //Initialize Instance
              A inum = new A();
          }
      }
  }
  </code></pre>