title: How to create class variable name dynamically in C#
body: <p><a href="https://i.stack.imgur.com/GZUuH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GZUuH.jpg" alt="enter image description here"></a></p>
  
  <pre><code>class CarMaker
  {
      public void MakeNewCar(int carCount)
      {
          string[] names = new string[carCount];
          Random random = new Random();            
          for (int i = 0; i &lt; carCount; i++)
          {
              int randomNum = random.Next(0, 3);
              Car **howCanIDo** = new Car(null, (EModels)randomNum, (EColor)randomNum);
          }
      }
  }
  </code></pre>