A lot of buzz has been created by Microsoft about .Net Framework 4.0. As a VB developer, I also looking into VB10 features. In fact I was presented in one of the local Technet/MSDN event recently. Nowadays, productivity always a key to most software development team. I came across this feature known as “auto implemented” feature in VB10 that really reduce 83% of the code compare with existing properties code in VB.net
Existing properties code
Auto implemented properties code in .Net 4.0
However, personally I feel that this feature has drive negative effect to certain developers especially the junior developer. It is because it doesn’t promote one of the Object Oriented Programming (OOP) practice – Encapsulation
If we want to implement Encapsulation in the Company properties, only the traditional way allows
For readers, please use the auto-implemented properties carefully. Make sure the new features of .Net 4.0 doesn’t affect your good practice of OOP.
For those properties that receive value directly. It should be fine. Anyway you still can use back the traditional properties code.