Click here to Skip to main content
15,910,009 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralSyntax Highlighting Pin
The Mighty Atom20-Jan-08 2:03
The Mighty Atom20-Jan-08 2:03 
GeneralRe: Syntax Highlighting Pin
The ANZAC20-Jan-08 18:36
The ANZAC20-Jan-08 18:36 
GeneralRe: Syntax Highlighting Pin
The Mighty Atom21-Jan-08 2:59
The Mighty Atom21-Jan-08 2:59 
GeneralRe: Syntax Highlighting Pin
The ANZAC21-Jan-08 14:06
The ANZAC21-Jan-08 14:06 
GeneralRe: Syntax Highlighting Pin
The Mighty Atom22-Jan-08 2:04
The Mighty Atom22-Jan-08 2:04 
GeneralGetting the number of rows from a table adapter query Pin
AAGTHosting19-Jan-08 17:17
AAGTHosting19-Jan-08 17:17 
GeneralQuestion about Shared modifier Pin
Alaric_19-Jan-08 11:04
professionalAlaric_19-Jan-08 11:04 
GeneralRe: Question about Shared modifier Pin
Luc Pattyn19-Jan-08 11:51
sitebuilderLuc Pattyn19-Jan-08 11:51 
Hi,


Alaric_ wrote:
Since the function is NOT static ...


Wrong AFAIK.


I'm not a VB expert but this is how I understand it:

1. "static" in VB.NET is what used to be "static" in C, i.e. keep a local variable alive inside
a procedure even when the procedure has exited (so it holds its value for the next execution)

2. "shared" in VB.NET is what is "static" in OO languages such as C#, i.e. have class
members that exist only once, and are shared amongst all instances of the class;
and static methods are methods that do not belong to a specific instance, hence can only
access static class members.

So if you have a C/C++/C# background, you should think of "static" whenever you encounter
"Shared" in VB code...

Hope this helps.

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: Question about Shared modifier [modified] Pin
Alaric_19-Jan-08 12:39
professionalAlaric_19-Jan-08 12:39 
GeneralRe: Question about Shared modifier Pin
Guffa19-Jan-08 13:02
Guffa19-Jan-08 13:02 
GeneralRe: Question about Shared modifier Pin
pmarfleet19-Jan-08 12:00
pmarfleet19-Jan-08 12:00 
GeneralRe: Question about Shared modifier Pin
Alaric_19-Jan-08 12:29
professionalAlaric_19-Jan-08 12:29 
GeneralRe: Question about Shared modifier Pin
pmarfleet19-Jan-08 12:40
pmarfleet19-Jan-08 12:40 
GeneralRe: Question about Shared modifier Pin
Guffa19-Jan-08 13:12
Guffa19-Jan-08 13:12 
GeneralRe: Question about Shared modifier Pin
Alaric_19-Jan-08 12:34
professionalAlaric_19-Jan-08 12:34 
GeneralRe: Question about Shared modifier Pin
pmarfleet19-Jan-08 12:45
pmarfleet19-Jan-08 12:45 
GeneralRe: Question about Shared modifier Pin
Alaric_19-Jan-08 13:53
professionalAlaric_19-Jan-08 13:53 
GeneralRe: Question about Shared modifier Pin
Guffa19-Jan-08 17:56
Guffa19-Jan-08 17:56 
GeneralPuzzling MDI Behaviour Pin
George B Gilbert19-Jan-08 10:25
George B Gilbert19-Jan-08 10:25 
GeneralTwilight Zone! Pin
George B Gilbert19-Jan-08 13:33
George B Gilbert19-Jan-08 13:33 
GeneralRe: Twilight Zone! Pin
Alaric_19-Jan-08 13:55
professionalAlaric_19-Jan-08 13:55 
GeneralIP address on LAN through a wireless router. CarPC project Pin
portreathbeach19-Jan-08 8:23
portreathbeach19-Jan-08 8:23 
GeneralRe: IP address on LAN through a wireless router. CarPC project Pin
portreathbeach19-Jan-08 11:33
portreathbeach19-Jan-08 11:33 
GeneralEmail Sending in VB2005 Pin
plural19-Jan-08 3:14
plural19-Jan-08 3:14 
GeneralRe: Email Sending in VB2005 Pin
Paul Conrad19-Jan-08 7:14
professionalPaul Conrad19-Jan-08 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.