variable scope

  • Thread starter Thread starter MattB
  • Start date Start date
M

MattB

I'm using vb.net/asp.net and have what will likely be an easy one. If I
want a variable to be accessible to different events within a class, how do
I declare them? I have some stuff in my page_load sub that I want to access
from a Button_click event. Anything I should be particularly aware or
careful of in this realm? Thanks!
 
Ah, looks like Private is what I'm after. Seems like I always find these
things just after posting. I get to share my struggle with all of you...
 
BTW, you're talking about accessibility rather than scope.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top