class Program
{
static void Main(string[] args)
{
Person.Age = 30; //并没有new一个Person,可以直接调用
Person p1 = new Person();
ConsoleApplication6.New.Person p2 = new New.Person();
Console.WriteLine(Person.Age);
Test();
Do d = new Do();
d.Test1();
Person pe = new Person();
pe.Name = "张三";
pe.SayHi();
Console.ReadKey();
}
/// <summary>
/// 1
/// </summary>
public class Person
{
public string Name; //非静态成员
public static int Age; //静态成员
public static void Page() //在类中声明一个静态方法
{
Console.WriteLine("输出:{0}", Person.Age);
}