全局变量 in C#??? what are you talking about? the best you can do is make them static members of some class

解决方案 »

  1.   

    在一个类中定义为一系列bool静态变量,如:
    namespace BoolTest
    {
     class BoolApp
      {
        public static bool bool1,bool2,......;
        public BoolApp
         {
           bool1=...;
           bool2=...;
           ......;
          }
      }
    }
    把它编译成booltest.dll文件,使用时如下:
      加入using BoolTest;
      编译时:/r:booltest.dll
      

  2.   

    写在一个Struct 里面, 或一个 静态类里好了