class People{
    public People(..参数){//构造函数}
    private int age;
    public int getAge(){return age;}
}


静态方法

public static int GeyAge(){}   
类名::GetAge()

属性

public int Age{get;set;}  //get和set也是方法可以自定义
public string Name{get{return...}};

首页 我的博客
粤ICP备17103704号