Cheers
Khurram
You will want to declare the field/property as static. This will make
the property/field accessible to anyone who references the assembly in the
app domain that can see the class (it might be internal, for example, and
not public).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
"Deecrypt" <kna...@gmail.com> wrote in message
news:1153583527.0...@s13g2000cwa.googlegroups.com...
It sounds to me as though you don't need global variables. You don't
need the value to be accessible to every method in every class in your
entire application, do you?
Could you give more information about what you're doing: what is in the
text box, and what is the class doing? That would help us propose a
good solution.
I am loading an ASP.NET website application through a Windows Form.
The form passess a value to the website which the website uses as
parameters to consume certain webservices. I just wanted to have some
clean code and thought that there should be a better way than calling
valueTextBox.Text all the time.
Thank you again
Khurram
Cheers
Khurram
If it's within the same instance of the same class that you need to
access the value, just create an instance variable within that class.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too