Use of properties in C#

Viewed 23

What is the difference in using a property and a variable in C#? For instance, public string customerName; public string CustomerName {get; set;} They both would work the same then what is the use of creating a property?

0 Answers
Related