This is a wonderful world

去自己想去的地方,呼吸那里的空气,贴近那里的土地,认识那里的人们......

导航

随笔分类 -  Language Related

怎样保证代码正确性(总结)
摘要:通过两种手段结合来保证代码的正确性,Program Proofs和Testing。1.Program Proofs 说白了就是代码注释。C#中函数的注释分为三部分。好的注释需要指明调用函数的pre-condition,post-condition并且assert函数输出是正确的。例如判断素数的函数IsPrime(int n)。它的注释应该这样写:Determine whether the ... 阅读全文

posted @ 2006-04-16 21:21 shyuan 阅读(998) 评论(1) 推荐(0)

Event Sample--by .NET Framework Developer's Guide
摘要:The sample presented here builds on the various pieces discussed in Events and Delegates and Raising an Event. This sample shows how to raise an event from your class and also how to handle the event.... 阅读全文

posted @ 2005-09-06 23:56 shyuan 阅读(376) 评论(0) 推荐(0)