The difference between fields and attributes


Fields are variables exposed by class with public modifiers, and attributes are encapsulation of fields. The essence of attributes is method {get; set;} method.

Fields are used to store data inside classes, and properties are values set or read when classes are provided for external calls.