2014年2月20日

c#中属性和字段的区别?

摘要: 字段是一种数据类型的变量,属性是为该字段提供只读,只写,读写功能。 public class C1 { private int num; //字段 private string str1; public int Num //属性 { get { return num; } set { num = Value; } ... 阅读全文

posted @ 2014-02-20 14:52 ssxm 阅读(503) 评论(0) 推荐(0) 编辑

导航