Utilities File

J

Joe

Hi,

I want to add a .vb file to my project that contains some
utility functions that will be re-used by different pages within the
project.

When I go to Add New Item, it offers me a Class file - which is
essentially a blank .vb file with some class syntax framework in it.
But what if I don't want a class, what if I just want a file that will
hold some public functions and subs that can be accessed from the vb
code-behind modules in the project.

I am trying to achieve some low-tech re-use. No inheritance,
just some publicly available functions. This should be fairly easy,
but it seems like VS is always looking for a class.

Can someone tell me how to achieve this?

J
 
M

Mark Rae [MVP]

Can someone tell me how to achieve this?

Declare the methods in the class as Public Shared - then you can access then
without having to instantiate the class...
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top