static class GlobalClass

{
        private static string m_globalVar = "";

        public static string GlobalVar
        {
            get { return m_globalVar; }
            set { m_globalVar = value; }
        }

}

 

 

GlobalClass.GlobalVar = "Some value";

myFormLabel.Text = GlobalClass.GlobalVar;

 

 

public class myGlobalClass
{

     private static string m_globalVar = "";

     public static string GlobalVar
    {
         get { return m_globalVar; }
         set { m_globalVar = value; }
     }
    public static void myGlobalFunction()
    {
            //function logic ...
    }
}

 

myGlobalClass.myGlobalFunction();