Admirer Of Nature

Finding Wonderland of .Net

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2005年2月23日

摘要: Effective C#: Item 2 Prefer readonly to const Item 2: 定义常量时,优先使用readonly,而不是const 在C#中,有两种类型的常量,compile-time和runtime。它们的性质是差别很大的。正确的选择对于你程序的稳定性和性能都有很大的影响。Compile-time常量速度稍稍快一点,但灵活性非常的差,而且容... 阅读全文
posted @ 2005-02-23 08:04 Admirer Of Nature 阅读(1571) 评论(4) 推荐(1) 编辑