KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: C#: Public Fields versus Automatic Properties Duplicate? I think not: This question is not the same as "Why use properties instead of public field". A property with a specified getter and setter is far different than a public field. My question was, is a property WITHOUT a getter and setter, any different. With the somewhat recent ability to have empty getters and setters, what is the benefit of using them instead of just declaring a public member variable? Example: public string MyProperty { get; set; } versus: public string MyProperty;
Tags (comma-separated)
Save Edits
Cancel