Class access modifiers and DevPartner Studio suggestions

Finally today I started getting my hands on DevPartner Studio, I had planned to do that yesterday but life is so umpredictable, isn’t it? heh, a last minute bug can change the natural course of things.
Anyway, one of the most frequent warnings I get on the project from the DevPartner Studio is “Class member field with protected access” the suggestion is to make the access identifiar Private instead of Protected.
For a nice explanation on Class access modifiers in VB.NET see this article.
So, there I go looking for Protected fields on my classes and setting them Private, but guess what? The DataBinding of the forms just blows up with this…Weird, I’m accessing those fields inside the form and assigning them to Private web form controls, hrm, well, it doesn’t work, so I just rolled back my Replace All “Protected” by “Private” and the project’s working again. It looks like the UI controls can’t be defined Private instead of Protected if you are going to do a server side data binding or property assignment.

If anyone knows the exact, well defined cause of this, please post a comment…

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.