Creating objects from constructors with arrays : <p>I'm a newbie and I'm trying to Console.Write() arrays from a constructor in Main. I am also trying to override ToString() to Console.Write() an array of ints as a string, but haven't found a clue how to do it.</p>

<pre><code> namespace Z1
 {
 class List
 {


  public List(int b)
  {
    int[] tabb = new int[b];
    Random r1 = new Random();
    for(int i=0;i&lt;b;i++)
    {
      tabb [i] =r1.Next(0, 100);
    }
  }

  public List()
  {
    Random r2 = new Random();
    int rInt1=r2.Next(0,10);
    int[] tabc = new int[rInt1];
    Random r3 = new Random();
    for(int i=0;i&lt;rInt1;i++){
      tabc [i] = r3.Next(0,100);

    }
  }
}

class Program
{
    static void Main()
    {
      List l1 = new List(10);
      List l2 = new List();
      Console.WriteLine(l1.ToString());
      Console.WriteLine(l2.ToString());

    }
}
</code></pre>

<p>}</p>
