H
Harald M. Genauck
Michael C said:A couple a reasons I can think of are that you only have to remember
the private constructor in 1 place vs potentially hundreds or
thousands of places where you need to qualify the module name.
Oh, that might depend on how many 'faked' static classes you have to
create.
Second reason is that a shared function forces developers to qualify
the function name. If you want to qualify the function then having a
built in method that forces developers to do it the correct way is a
*really* good thing (tm). THis is especially true in a team
environment.
There are many things a especially team developers might or should be
forced to. Not so many are built in, even not in other environments
than VB.NET.
But you still use redim in some places?
For e.g.: When converting some C# code to VB.NET code it was easier to
'redim preserve' an array than to convert the C# author's
copy-one-array-to-another code.
Oh ok, it misread your post. You do need to add a reference to some
library with the name VisualBasic in it I suspect? I can't see a lot
of C# developers doing this. )
Ok, you might reference one or some of all the many other libraries out
there in the net that are providing some or many of the My namespace
features, if you don't want to write all the stuff yourself into an own
library. You might ending up adding a few more than only one
reference, but, that really doesn't matter.
Harald M. Genauck
"VISUAL STUDIO one" - http://www.visualstudio1.de
"ABOUT Visual Basic" - http://www.aboutvb.de