You have to declare public variable inside the class like
public string myVariable = "Test";
You have to store MyOtherClass as member in the class where you want to
access to like
public MyOtherClass mOtherClass;
To access the public variable in of MyOtherClass you can say
mOtherClass.MyVariable
Other way is to declare variable as static member. VB approach wont be
applicable in c# in this case.
--
Shak
(Houston)
"freddy" <fr****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
I know in vb.net you can declare a global variable, but how do you declare
one in c#. I want to make a connection class with the path and have it
accessed by anther class or method.
Thank you