To be clear, I'm not asking for the Difference between a field and a property.
Assuming I have just a basic auto-property, with no other access modifiers, what is the difference / advantage of having this:
class Book
{
public string Title { get; set; }
}
over this:
class Book
{
public string Title;
}
To the client code using Book
, it makes no difference: reads and writes are still done to Book.Title
.
What benefits does the Auto Property offer over the simplistic Field?