[GH] To the best of my knowledge, you are correct. VB.NET will not
automatically convert these variables to properties, and yes you will need
to code the wrappers / overhead yourself. However, some good news. In my
experience, I have found that creating properties in VB.NET in actually much
faster and easier than VB6. Mainly due to the autocomplete and the combined
Get/Set blocks. So while there might be more words in your source, you
actually end up doing like less than half the typing you would in VB6.
Lastly, is there some good reading out there on how to get one's mind thinking
about programing in a way that one's software designs minimize the use of
public class variables?
[GH] Good question. Sadly, I don't personally know of any; hopefully someone
else will chime in with a recommendation. I get the impression that you are
thinking that we all are saying that lots of public fields in classes is a
bad thing. Well, public "variables" / "fields" exposed in the way you are
talking about is less than ideal, even in VB6 they really should be wrapped
in a property for a few very reasonable reasons. However, using classes to
store a bunch of related values, similar to a User Defined Type, is actually
encouraged, especially in .NET. If you can group related methods and make
the class more self contained / self aware, then you are on your way to the
Object Oriented approach.
[GH] Based on my experience in retraining on VB.NET from VB6, my best advice
for the moment would be: "Try" not to become too frustrated. I know it isn't
easy ;-) But take the time to learn the VB.NET way of doing things. In time,
you will adjust and it won't take too long before you start to like .NET
more than VB6. If you let the inevitable frustration take over, it will
cloud your mind to learning new things. Just keep in mind that they are
different. If you try to make VB.NET be VB6, you will drive yourself nuts.
For me personally, I don't like VB.NET's level of COM support. So what I
have been doing is coding the COM portions in VB6 still, especially for VBA,
and then referencing it into .NET. Backwards? well yeah a bit. But
interestingly, coding in VB.NET for a short time has made me a much better
VB6 programmer than decades of experience. So hang in there, it gets better.
Gerald