Hello, I'm creating setters and getters for a class, for visual purposes is it better this way or compressed in a single line (as in the red box)?

Hello, I'm creating setters and getters for a class, for visual purposes is it better this way or compressed in a single line (as in the red box)?

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Sep 21, 2022, 6:48 AM
In C# you don't need to create setters and getters explicitly most of the time, you can use properties, often auto properties
Uday DodiyaPosted Sep 21, 2022, 9:09 AM
Yes, It is good one.
Sachin SinghPosted Sep 21, 2022, 5:59 AM
for me less lines of code is always good. So, use the lambda's one.