- ·上一篇文章:火电厂用冷却塔替代烟囱的探讨_电力论文
- ·下一篇文章:ADO如何取得资料表栏位资讯(BIG5)
日期:2006-07-19 06:47:30 来源:www.cngr.cn
C# Code Review Checklist
实现 Iserializable 接口的类是否显式的实现 GetObjectData 和 隐式的构造函数,例如 Serializaioninfo 和 StreamingContext 作为参数
When doing floating point calculations,?are all constants doubles rather than integers?
做浮点运算的时候,所有的常量都是double 类型而不是整数
Do all delegates have a void return type and avoid using output or ref parameters?
委托是否都有 void 返回值,避免使用 out 或者 ref 类型的参数
Do?all delegates send the sender (publisher) as the first argument?? This allows the subscriber to tell which publisher fired the event.?
所有的委托又有 sender 对象作为第一个参数
Are all members of derived EventArg classes read-only?? This prevents one subscriber from modifying the EventArgs, which would affect the other subscribers.
从 EventArg 继承的类是否是只读的, 只读的参数可以避免一个订阅者对参数的修改影响其他的参数订阅者
Are delegates published as events?? This prevents the subscribers from firing the event, see Lowy, p. 102?for details.
所有的委托发布事件?
Is common setup and teardown nUnit code isolated in?Setup and Teardown methods that are marked with the appropriate attribute?
单元测试的时候, 常见的驱动代码和测试代码分开.
Do negative nUnit tests use the ExpectedException attribute to indicate that an exception must be thrown?
使用 ExpectedExcetpion 来指示异常
When doing floating point calculations,?are all constants doubles rather than integers?
做浮点运算的时候,所有的常量都是double 类型而不是整数
Do all delegates have a void return type and avoid using output or ref parameters?
委托是否都有 void 返回值,避免使用 out 或者 ref 类型的参数
Do?all delegates send the sender (publisher) as the first argument?? This allows the subscriber to tell which publisher fired the event.?
所有的委托又有 sender 对象作为第一个参数
Are all members of derived EventArg classes read-only?? This prevents one subscriber from modifying the EventArgs, which would affect the other subscribers.
从 EventArg 继承的类是否是只读的, 只读的参数可以避免一个订阅者对参数的修改影响其他的参数订阅者
Are delegates published as events?? This prevents the subscribers from firing the event, see Lowy, p. 102?for details.
所有的委托发布事件?
Is common setup and teardown nUnit code isolated in?Setup and Teardown methods that are marked with the appropriate attribute?
单元测试的时候, 常见的驱动代码和测试代码分开.
Do negative nUnit tests use the ExpectedException attribute to indicate that an exception must be thrown?
使用 ExpectedExcetpion 来指示异常
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论
