By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,375 Members | 1,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,375 IT Pros & Developers. It's quick & easy.

variable scope

P: n/a
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!

--

Matt

"Gravity. It's not just a good idea, it's the law!"
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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...

MattB wrote:
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!


Nov 18 '05 #2

P: n/a
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.

"MattB" <so********@yahoo.com> wrote in message
news:bv************@ID-86156.news.uni-berlin.de...
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...

MattB wrote:
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!


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.