Jenna, often choosing shared members is done becuase its nicer to program
against. Consider the Environment class, which only has statics. It has a
lot fo related methods on it, but really, you're not generally going to be
manipulating 10 of those methods at the same time, but instead, you're going
to be using one at a time. In this scenario, its nice to not have to dim up
anew version of the class. The same goes for the Math class, and other
classes also.
Other times, it's just good sense. Consider this code:
Dim dt as DateTime = new DateTime()
dt = dt.Now()
That code really doesn't look that good, since Now() is NOTHING to do with
an instance, but specifically, is related to a concept independent of each
inidividual DateTime. which is why we instead do:
Dim dt as DateTime = DateTime.Now()
The key thing is, use shared members when data or functionality does not
vary on an instance by instance basis.
Regards,
Kit
"Jenna Schmidt" <je***@nospam.artifextech.com> wrote in message
news:03****************************@phx.gbl...
I know that one of the benefits of using "Shared" methods
is you do not explicitly have to Dim as New object to
access the method.
Are there some other implications with memory and
concurrency issues with lets say 25-50 concurrent users?
What are the pros and cons of using this type of method?
Thanks so much,
Jenna Schmidt