虽说是基础,竟然一直没弄明白。
public string BsiStatus { get; set; } private string status_; public string status { get { return ChangeStatus(status_); } set { status_ = value; } }
get设置status的只读属性,set设置status的写入属性
_ueditor_page_break_tag_
public string BsiStatus { get; set; } public string status { get { return ChangeStatus(BsiStatus); } }
public string ChangeStatus(string BsiStatus) { var result = ""; if (("3").Contains(BsiStatus)) { result = "0"; } if (("45").Contains(BsiStatus)) { result = "1"; } if (("6").Contains(BsiStatus)) { result = "2"; } if (("78").Contains(BsiStatus)) { result = "3"; } if (("9ab").Contains(BsiStatus)) { result = "4"; } if (("c").Contains(BsiStatus)) { result = "5"; } return result; }