C# public class Person
来源:互联网 发布:重庆广联达计价软件 编辑:程序博客网 时间:2024/05/29 03:41
/// <summary>
/// Person 的摘要说明。
/// </summary>
public class Person
{
//初始化个人信息类
private string name; //用户姓名
private string sex; //用户性别
private int age; //用户年龄
private string address; //详细地址
private string city; //所在城市
private string province;//所在省份
private string country; //所在国家
private string telephone; //固定电话
private string mobilephone; //手机号码
private string idCard; //身份证号码
public Person()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
#region 设置获取用户的姓名信息
public string getName()
{
return name;
}
private void setName(string name)
{
this.name = name;
}
#endregion
#region 设置获取用户的性别信息
public string getSex()
{
return sex;
}
private void setSex(string sex)
{
this.sex = sex;
}
#endregion
#region 设置获取用户的年龄信息
public int getAge()
{
return age;
}
private void setAge(int age)
{
this.age = age;
}
#endregion
#region 设置获取用户的详细地址信息
public string getAddress()
{
return address;
}
private void setAddress(string address)
{
this.address = address;
}
#endregion
#region 设置获取用户的所在城市信息
public string getCity()
{
return city;
}
private void setCity(string city)
{
this.city = city;
}
#endregion
#region 设置获取用户的所在省份信息
public string getProvince()
{
return province;
}
private void setProvince(string provincey)
{
this.province = province;
}
#endregion
#region 设置获取用户的所在国家信息
private void setCountry(string country)
{
this.country = country;
}
private string getCountry()
{
return country;
}
#endregion
#region 设置获取用户的固定电话信息
private void setTelephone(string telephone)
{
this.telephone = telephone;
}
public string getTelephone()
{
return telephone;
}
#endregion
#region 设置获取用户的移动电话信息
private void setMobilephone(string mobilephone)
{
this.mobilephone = mobilephone;
}
public string getMobilephone()
{
return mobilephone;
}
#endregion
//设置身份证号码
public string getIdCard()
{
return idCard;
}
//获取人的身份证号码
private void setIdCard(string idCard)
{
this.idCard = idCard;
}
}
- C# public class Person
- C# class 前加 Public 的作用
- class Student < Person
- c#中class前面加一个public具体是什么意思
- public class与public partial class
- public class与public partial class 区别
- public class与public partial class
- public class Object
- class CrobotApp : public CWinApp
- class CSplitterWnd :public CSplitterWnd
- class IconEditor : public QWidget
- public class MyEclipseRegister{
- C++ public class
- public class staticInter
- public class Unname2
- public class CharToByte {
- public class ByteUtil {
- public class CharUtil {
- Html符号大全
- 让Windows2000、WindowsXP、Windows2003自动登陆
- 天下第七C#学习笔记(2)
- 天下第七C#学习笔记(1)
- 基于哈夫曼编码的任意文件压缩与解压
- C# public class Person
- clientHeight vs. offsetHeight
- MSDN索引风格的JDKAPI文档——CHM帮助文件[英文版]
- 网络电台地址
- javascript 继承实现方法
- Travel Manners Smmary
- slice 方法 (Array)
- 学习笔记--AxWIndowsMediaPlayer 属性
- AxWindowsMediaPlayer媒体文件主要方法属性