title: Why am I printing out 'System.Int32[]' instead of my array of numbers?
body: <p>I am trying to print out my array of numbers that I have assigned to a particular array. My algorithm  for choosing numbers consists of choosing a random number that is not a duplicate and storing it inside the array.</p>
  
  <p>Pretty simple really, but I have no idea as to why it is printing out this error.</p>
  
  <pre><code>int[] ticket1 = new int[4];
  for (int i = 0; i &lt; 4; i++)
  {
      int temp = rand.Next(43);
      while (ticket1.Contains(temp)) 
      {
          temp = rand.Next(43);
      }
      ticket1[i] = temp;
  }
  Console.WriteLine("{0}{1}", item.PadRight(20), ticket1.ToString());//ticket1 produces System.Int32[] instead of 4 numbers.
  //I have changed this line to:
  //Console.WriteLine("{0}{1}", item.PadRight(20), string.Join(",", ticket1));
  //And it still doesn't work. the error remains. (System.Int32[])
  </code></pre>
  
  <p>My question is, how can I print out my 4 numbers (beside each other) in string format.</p>
  
  <p><strong>//EDIT:</strong> I've found my problem. I am putting my ticket1 inside a foreach loop, it's somehow not reaching out to the array values and it therefore prints out System.Int32[] instead.</p>
  
  <p>All fixed.</p>