How can i assign values to auto implemented backing fields like this::
`private string code = "N.A";
private string name = "not known";
private int age = 0;
// Declare a Code property of type string:
public string Code
{
get
{
return code;
}
set
{
code = value;
}
}`
how would i accomplish the same thing using auto properties for example:
public string Code { get; set; }
Obviously you cant just add the value directly to the auto property like this:
public string Code = "N.A" { get; set; }