title: Overriding ToString() of List<MyClass>
body: <p>I have a class MyClass, and I would like to override the method ToString() of instances of List:</p>
  
  <pre><code>class MyClass
  {
      public string Property1 { get; set; }
      public int Property2 { get; set; }
      /* ... */
      public override string ToString()
      {
          return Property1.ToString() + "-" + Property2.ToString();
      }
  }
  </code></pre>
  
  <p>I would like to have the following:</p>
  
  <pre><code>var list = new List&lt;MyClass&gt;
              {
                  new MyClass { Property1 = "A", Property2 = 1 },
                  new MyClass { Property1 = "Z", Property2 = 2 },
              };
  
  Console.WriteLine(list.ToString());   /* prints: A-1,Z-2 */
  </code></pre>
  
  <p>Is it possible to do so? Or I would have to subclass List&lt;MyClass> to override the method ToString() in my subclass? Can I solve this problem using extension methods (ie, is it possible to override a method with an extension method)?</p>
  
  <p>Thanks!</p>