摘要: 看到这个特性时,以为能少声明内部字段,像以下代码那么写public class TestValue{ [DefaultValue(true)] public bool IsSame { get; set; }} 但其实测试过后,直接获取IsSame属性,并不是true,而且测试其他数据类型,也是一样 后来网上查了下,才发现之前的理解是错的,一下是MSDN的解释A DefaultValueAttribute will not cause a member to be automatically initialized with the at... 阅读全文
posted @ 2013-04-28 11:45 逍遥子k 阅读(434) 评论(0) 推荐(0) 编辑