c# - What is the difference between a field and an auto property? -
this question has answer here:
- when should use field rather property? 7 answers
i cannot see differences between these 2 classes are:
class class1 { public int a; } class class2 { public int { get; set; } }
why latter used when 1 can use former?
with property, can turn "variable" getter/setter paradigm after fact, , you'll break less code
properties tend play better frameworks make use of reflection
Comments
Post a Comment