This is a scenario I come across all the time. I want all the public properties to be assigned in the ctor but just lower case the first letter. Is there a method to do this?
class User
{
public int ID { get; }
public string Name { get; }
public string Initials { get; }
public DateTime LastLogOn { get; }
public Role Role { get; }
public User (int ID, string name, string initials, DateTime lastLogOn, Role role)
{
Name = name;
Initials = initials;
LastLogOn = lastLogOn;
Role = role;
}
}