摘要: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->ProcessmyProcess=newProcess();ProcessStartInfomy... 阅读全文
posted @ 2013-01-11 10:57 gnhao 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 当调用 Remove 失效时 [C#]Written by Allen Lee有没有试过从一个集合里面移除一个对象之后,这个集合仍然留有这个对象?世界之大,无奇不有。稍有疏忽,便会导致这种奇怪的现象。现在让我们看看这个“不死”对象究竟是怎么一回事。1、“不死”对象现身这个问题起初是我一个同事提出的,为了重现“不死”对象,现把代码简化如下://Code#01IListproducts=newList... 阅读全文
posted @ 2013-01-11 10:49 gnhao 阅读(233) 评论(0) 推荐(0) 编辑
摘要: readonly vs. const [C#]Updated on Friday, October 29, 2004Written by Allen Lee Features:readonly和const都是用来标识常量的[1]。 const可用于修饰class的field或者一个局部变量(local variable);而readonly仅仅用于修饰class的field。 const常量的值必... 阅读全文
posted @ 2013-01-11 10:43 gnhao 阅读(171) 评论(0) 推荐(0) 编辑