Fields vs Properties
Fields are variables inside a class. Properties are used to provide a flexible mechanism to read, write, or compute the value of a private field.
Why use Properties?
To control access (Encapsulation).
csharp class Person { private string name; // field
public string Name { // property
get { return name; }
set { name = value; }
}
}
Automatic Properties:
csharp public string Color { get; set; }