Dave's Notebook

VB.NET Hide Module Name

misc_vol3_064 Here’s a quick tip for those of you still using modules in your VB.NET applications.

If you create a module and don’t want to see the module name in your intellisense, you can hide it with an attribute.  This can be extremely useful when you have a lot of modules that would show up in your intellisense code and they don’t have names that conflict with each other.

1
2
3
4
5
6
7
<HideModuleName()>
Module Module1
Sub NewFunction()
Return
End Sub

End Module

You can still reference NewFunction() via Module1

1
Module1.NewFunction()

But Module1 will no longer show in intellisense.