【C# winform 代码】类的静态成员及静态方法

时间:2020-09-24 03:27:45
【文件属性】:
文件名称:【C# winform 代码】类的静态成员及静态方法
文件大小:45KB
文件格式:RAR
更新时间:2020-09-24 03:27:45
C# winform 类 静态成员 静态方法 Microsoft Visual Studio 2010做的C# winform类的静态成员及静态方法,主要代码: public class Student { private int IDBase = 20080000; private int ID; public static int StudentNumber; public string Name; public int age; public string Home; public Student(string Name,int age, string Home) { this.Name = Name; this.age = age; this.Home = Home; StudentNumber++; this.ID = 20080000 + StudentNumber; } public string getinfo() { string sReturn = ""; sReturn += "学号:" + ID + "\n"; sReturn += "姓名:" + Name + "\n"; sReturn += "年龄:" + age + "\n"; sReturn += "住址:" + Home + "\n"; return sReturn; } public static int getStudentNumber() { return StudentNumber; } }
【文件预览】:
类的静态成员及方法
----WindowsFormsApplication1()
--------WindowsFormsApplication1()
--------WindowsFormsApplication1.sln(914B)
--------WindowsFormsApplication1.suo(23KB)

网友评论