title: Processing int to name of list
body: <p>I try to write a simple console application with Hanoi towers. But I am stuck at one point. </p>
  
  <p>In my program I ask a person to write from to which tower wants to put the disk, but: I have 3 lists as towers, I'll ask for a number from gamer and now how I can build a "compare method"? Because I don't want to copy the same piece of code 6 times...</p>
  
  <pre><code>class Towers : Disks
  {
      //public Towers(int Value, int WhereItIs) : base(Value, WhereItIs) { }
  
      public List&lt;Disks&gt; Tower1 = new List&lt;Disks&gt;();
      public List&lt;Disks&gt; Tower2 = new List&lt;Disks&gt;();
      public List&lt;Disks&gt; Tower3 = new List&lt;Disks&gt;();
  
      public void Compare(int dyskFrom, int dyskWhere) {
      }
  
      public void Display() { 
          foreach(var i in Tower1){
              Console.WriteLine("Where: {0} | Value: {1}", i.WhereItIs, i.Value);
          }
      }
  
      public void Build(int TowerHigh) {
          for (int i = TowerHigh; i &gt; 0; i--) {
              Tower1.Add(new Disks {Value = i, WhereItIs = 1 });
          }
      }
  }
  
  class Disks
  {
      public int Value; //wartosc krazka
      public int WhereItIs; //na ktorej wiezy sie on znajduje
  }
  
  class Program
  {
      static void Main(string[] args)
      {
          Towers Tower = new Towers();
          int TowerHigh;
          Console.Write("Podaj wysokość wieży: ");
          TowerHigh = int.Parse(Console.ReadLine());
  
          Tower.Build(TowerHigh);
          Tower.Display();
          Tower.Compare(1, 2);
      }
  }
  </code></pre>