标签:
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ClassTrining 7 { 8 class 员工 9 { 10 /// <summary> 11 /// 姓名 12 /// </summary> 13 public string 姓名 { get; set; } 14 /// <summary> 15 /// 手机 16 /// </summary> 17 public string 手机 { get; set; } 18 /// <summary> 19 /// 工号 20 /// </summary> 21 public int 工号 { get; set; } 22 /// <summary> 23 /// 工资 24 /// </summary> 25 26 public decimal 工资 { get; set; } 27 28 /// <summary> 29 /// 只卖属性 30 /// </summary> 31 public string MyName { 32 get { return "MetroX"; } 33 } 34 35 36 private int _age = 10; 37 /// <summary> 38 /// 只写属性 39 /// </summary> 40 public int Age { 41 set { _age = value; } 42 } 43 } 44 }
标签:
原文地址:http://www.cnblogs.com/linhongquan/p/5470651.html