1 /*
 2  * 编写者: 且共从容
 3  * 日期: 2009-10-3
 4  */
 5 using System;
 6 using System.Collections.Generic;
 7 
 8 namespace app
 9 {
10  class A
11  {
12   public static int a=9;
13   public int b=0;
14  }
15  class MainClass
16  {
17   public static void Main(string[] args)
18   {
19    A t=new A();
20    Console.WriteLine("{0}",t.b);//实例访问
21    Console.WriteLine("{0}",A.a);//类访问
22    Console.ReadLine();
23   }
24  }
25 }
26 
27 

 

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-11-30
  • 2021-11-20
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案