Re: globals?
- From: "_AnonCoward" <abc@xxxxxxx>
- Date: Fri, 26 Jan 2007 14:50:52 -0500
"Smokey Grindle" <nospam@xxxxxxxxxxxxxx> wrote in message
news:u8UQM8XQHHA.3440@xxxxxxxxxxxxxxxxxxxxxxx
:
: Whats the easiest way to make a global function in VB 2005? The
: old way was make a module, is that still the standard? thanks!
Try shared methods. These methods are available to every instance of a
type and can even be accessed without an actual instance being
declared (e.g.: the System.Console.WriteLine() method). It should be
noted that shared methods cannot operate on non-shared members of the
class. The following will not compile:
=========================================
Public Class [class]
Private i As Integer = 0
Public Shared Sub Method()
Console.WriteLine(i)
End Sub
End Class
=========================================
Ralf
--
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
.
- Follow-Ups:
- Re: globals?
- From: Cor Ligthert [MVP]
- Re: globals?
- References:
- globals?
- From: Smokey Grindle
- globals?
- Prev by Date: Re: globals?
- Next by Date: Re: Every possible 3 digit combination generator
- Previous by thread: Re: globals?
- Next by thread: Re: globals?
- Index(es):
Relevant Pages
|