Re: number of users



shared means the variable is "shared" between all threads (the variable is
actually part of the class, not the class instance).

public means the variable can be accessed from outside the class.

private means the variable can only be access from within the class.

so

public shared i as int 'can be access from any class or module in
the application
private shared i as int 'can only be accessed from the defining class

in both cases the value is the same from any thread.


-- bruce (sqlwork.com)



"Joe" <tphu99@xxxxxxxxx> wrote in message
news:1124916290.668017.108250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> That was it! One of the variable was declared as Public Shared and I
> guess that it acts like an Application variable.
>
> But one question what is the difference between a Public Shared vs
> Private Shared
> and Public Shared vs Public.
>
> Thank you!
>


.