c# - What is the difference between a field and an auto property? -


this question has answer here:

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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -