Hi Team,
Following is a question regarding using Properties in class.
I am software engineer with 3 years of experience. I have been using public properties instead of exposing member variables publically. Many a people told that this approach helps in encapsulation. I don’t realize any encapsulation advantage by making it a property.
While discussions, I came to know that not many people knows about the real reason for going for Property. They just do it as part of coding standard.
Can someone clearly explain how Property is better than public member variable? How it improves encapsulation?
Thanks
Lijo