In a windows application?
Make a static class, with static methods and functions
-
public static class myglobalclass
-
{
-
private static int myint = 0;
-
public static string mystring="Everyone can use me";
-
-
public static string MyFunc(int num)
-
{
-
myint=myint+num;
-
return myint.ToString();
-
}
-
}
-
Since you cannot create an instance of static classes, you would address that like:
-
string howmany=myglobalclass.MyFunc(2);
-
You can use them anywhere. You should be able to build on those ideas.