//initializing the class directly private static void Main2() { AutoImplementedProps autoImplementedProps = new AutoImplementedProps(); autoImplementedProps.PlayerNumber = 3; //autoImplementedProps.FieldName = "ksdfjg"; // Problem setting the FieldNAme - Must use a constructor or factory method }
//initializing props through the constructor private static void Main() { AutoImplementedProps autoImplementedProps = new AutoImplementedProps(3, "Hello"); // No problem setting the FieldName }