DEV Community

Discussion on: Encapsulate state and expose behavior when writing object-oriented code

Collapse
jvarness profile image
Jake Varness

Not a bad topic. Encapsulation is definitely important. In C# you could also make your sets private as well. This would allow you to easily get the value of a property, but not allow you to easily modify it.