What's the benefit of using automatic properties in c#? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9

What's the benefit of using automatic properties in c#?

See this two code: https://code.sololearn.com/c3bYxiVRaUwu/?ref=app https://code.sololearn.com/cA3qHE5oGZCN/?ref=app On the first code I used variable in class and on the second code I used automatic properties in class. In this two code the answer is same. So my question is what's the benefit of using automatic properties since we can do the same work using variable?

7th Sep 2020, 5:45 PM
The future is now thanks to science
The future is now thanks to science - avatar
1 Answer
+ 5
Thanks ~ swim ~ for your answer and quick response.
7th Sep 2020, 6:05 PM
The future is now thanks to science
The future is now thanks to science - avatar