public class A{ public static int Count;}// 在类B中使用类A中的变量public class B{ public void SomeMethod() { A.Count = 100; Console.WriteLine(A.Count); }}