public variable
C#
3
Posts
3
Posters
0
Views
1
Watching
-
hellow to all .. i am trying to creat a public variable in my forum that i could access it from othere forms .. but it is not working for me .. how can i creat it ... thxx
-
hellow to all .. i am trying to creat a public variable in my forum that i could access it from othere forms .. but it is not working for me .. how can i creat it ... thxx
The simplest solution is to create a class with a static field in your Forms namespace.
class MyClass { public static int publicVariable = 0; }
You access the variable above by: MyClass.publicVariable = 10; -
hellow to all .. i am trying to creat a public variable in my forum that i could access it from othere forms .. but it is not working for me .. how can i creat it ... thxx