So, I'm writing a small program in VB.net and I was wandering if there's a replacement for the include statement I'm used to in C/C++? That's instead of making all my classes and functions "public shared".
Are their security concerns, or is it bad practice to keep declaring all the classes or functions I wish to use in other .vb files as public shared?
For example let's say I write a hashing function for passwords within passwords.vb
and I want to use it within a UI file login.vb
, to do this I would declare my hashing function as a public shared funtion within a public class (unless I'm missing another way). That way I can access it by using something along the lines of password.Hash(STRING)
where password.
is a reference to my password.vb file.
Now in C/C++ I would add an include statement to the header file that would define everything I needed it too. I know header files don't exist but there's not other way to include a separate .vb file, other than making everything public? It just seems odd to me and it feels like having possibly hundreds of public classes/variables/functions etc... is somehow the wrong way to do it?
I'm aware of .dll referencing as an alternative, but I don't really want to have 20 .dll files associated with a program if I can help it, or unless it should be like that?
Thanks for your help and I hope that what I'm asking makes sense.