C# public class Person

來源:互聯網
上載者:User

/// <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;
  }
 } 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.