Record type with multiple constructors

Simply add the constructor you want like this:

record Rank(int level, string description);

record Manager(string FirstName, Rank Rank) {
  public Manager() : this("", new Rank(0, "Entry")) { }

  // public Manager(string FirstName, Rank Rank) is auto generated
}
                          

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)