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.

<HideModuleName()> _
Module Module1
    Sub NewFunction()
        Return
    End Sub

End Module

You can still reference NewFunction() via Module1

Module1.NewFunction()

But Module1 will no longer show in intellisense.

Related Post

  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it wrong, which...
  • DotNetNuke – Modules – Portal Specific ModulesDotNetNuke – Modules – Portal Specific Modules Many of you won't care too much about creating Portal Specific Modules because you'll be creating modules for an environment that only has one portal. However, if you are creating a module for res...
  • VB.NET Processing Before WinForm DisplayVB.NET Processing Before WinForm Display I woke up this morning to an interesting question. “Using VB.net 2008, I want my project to be a Windows Forms Application, but upon startup, I want to check a few files to see if they exist and...
  • DotNetNuke Modules – Install DNN into VS 2008DotNetNuke Modules – Install DNN into VS 2008 Today, we will install DotNetNuke into Visual Studio so that we can create our first module. So fire up Visual Studio, and let's get going. I'll be using Visual Studio 2008 to walk you thro...
  • VB.NET Nullable Value TypesVB.NET Nullable Value Types SQL has long had the ability to specify that a value is NULL even if it is a primitive type, but the only way you could have a NULL value in VB.NET is if you were dealing with an object. That is...