Re: globals?
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Sat, 27 Jan 2007 14:05:30 +0100
Anon,
Be aware that it is not OOP, you forgot to tell that.
Cor
"_AnonCoward" <abc@xxxxxxx> schreef in bericht
news:45ba5b9b$0$16947$4c368faf@xxxxxxxxxxxxxxxxx
"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: Tom Leylan
- Re: globals?
- References:
- globals?
- From: Smokey Grindle
- Re: globals?
- From: _AnonCoward
- globals?
- Prev by Date: Re: globals?
- Next by Date: Re: globals?
- Previous by thread: Re: globals?
- Next by thread: Re: globals?
- Index(es):
Relevant Pages
|
Loading