.dll in vb.net

N

Nano

Hello,

I am creating a dll in VB .net, with a root namespace of
Companyname.Justfunctions, which only contains some functions for string
operations I perform regularly in different applications.

Now where can these functions best be put inside the dll? In a "public
module"-block? Or are there other/bether methods to create a dll with just
functions? Reason I am getting confused is that when in my ide and code-
autocomplete, I also see the Companyname.Justfunctions.Modulename alongside
the functions as Companyname.Justfunctions.Function1

Thanks in advance!

Nano
 
C

Carlos J. Quintero [.NET MVP]

Hi,

You can use also a class named Justfunctions with Shared functions and
shorten the root namespace to Companyname.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
J

Jody L. Whitlock

Nano said:
Hello,

I am creating a dll in VB .net, with a root namespace of
Companyname.Justfunctions, which only contains some functions for
string operations I perform regularly in different applications.

Now where can these functions best be put inside the dll? In a
"public module"-block? Or are there other/bether methods to create a
dll with just functions? Reason I am getting confused is that when in
my ide and code- autocomplete, I also see the
Companyname.Justfunctions.Modulename alongside the functions as
Companyname.Justfunctions.Function1

Thanks in advance!

Nano

Personally, I would use CompanyName as the root namespace.
Then, encapsulate the class in a namespace like Common.
Then create a Public Class StringFunctions

It looks way better and if you continue to use this method of
distributing functions, you can make sub-namespaces in your DLL and
things can be all happy and organized.

HTH,
Jody
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top