Utilities File

Discussion in 'ASP .Net' started by Joe, Dec 4, 2007.

  1. Joe

    Joe Guest

    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
     
    Joe, Dec 4, 2007
    #1
    1. Advertising

  2. "Joe" <> wrote in message
    news:...

    > 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...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Dec 4, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. _eee_
    Replies:
    3
    Views:
    506
    Rick Strahl [MVP]
    Feb 28, 2004
  2. Ganesh
    Replies:
    4
    Views:
    389
    Thomas Weidenfeller
    Jan 31, 2005
  3. Marcus Leon

    Ant Utilities?

    Marcus Leon, Feb 4, 2005, in forum: Java
    Replies:
    1
    Views:
    707
    Bryce
    Feb 4, 2005
  4. James Yong
    Replies:
    2
    Views:
    3,660
  5. JKV
    Replies:
    0
    Views:
    443
Loading...

Share This Page