Primary
This allows you to use the class declaration to specify the most common constructor
class Person(string name, int age)
{
private string _name = name;
private int _age = age;
}
instead of
class Person(string name, int age)
{
public Person (string name, int age)
{
_name = name;
_age = age;
}
}
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext