Why in C# 3.0, when we overload constructor of a specified class, we should write default construct

Posted by odiseh on Stack Overflow See other posts from Stack Overflow or by odiseh
Published on 2010-04-13T10:04:26Z Indexed on 2010/04/13 10:12 UTC
Read the original article Hit count: 360

Hi Why in C# 3.0, when we overload constructor of a specified class, we should write default constructor in class body? As far as I know, It was no need to do so.

class Test
{
      public int ID {get; private set;}
      public int Name {get; private set;}

      public Test() 
      {
      }

      public Test(int id, int name)
      {
           ....
      }

}    

Thank you

© Stack Overflow or respective owner

Related posts about c#3.0

Related posts about constructor