1 / 21
文档名称:

代码规范2CodingRule2.doc

格式:doc   大小:295KB   页数:21页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

代码规范2CodingRule2.doc

上传人:63229029 2017/8/23 文件大小:295 KB

下载得到文件列表

代码规范2CodingRule2.doc

相关文档

文档介绍

文档介绍:开发规范: C#
作者AUTHOR : IT
文档编号DOC. ID : 200710001
级别REV. LEVEL : 1
日期DATE : 2007-10-24
状态STATUS : Release
摘要Abstract
本规范意在对于以下事项产生积极的影响(The objective of this coding standard is to have a positive effect on)
避免BUG,特别是一些难以发觉的。(Avoidance of errors/bugs, especially the hard-to-find ones.)
可维护性,通过提倡使用一些设计原理。(Maintainability, by promoting some proven design principles.)
可维护性,通过要求或建议应用统一的风格。(Maintainability, by requiring or mending a certain unity of style.)
性能要求,通过劝阻一些不良的****惯。(Performance, by dissuading wasteful practices.)
规范和建议意在提高软件系统的可靠性与可维护性。(Rules and mendations are given that promote reliability and maintainability.)
目录catalog
1 一般规则General rules 3
概述Overview 3
规则与建议Rules and mendations 3
2 命名规则Naming conventions 4
概述Overview 4
规则与建议Rules and mendations 5
3 ments and embedded documentation 12
概述Overview 12
规则与建议Rules and mendations 12
4 编码风格Coding style 15
概述Overview 15
规则与建议Rules and mendations 15
一般规则General rules
概述Overview
Rule ******@102: 如果有违背建议规则的情况发生,必须有很好的理由。Every time a mendation is not followed, this must have a good reason.
Rule ******@105: 不要在一个文件中搀杂不同提供者的编码。Do not mix code from different providers in one file
规则与建议Rules and mendations
Rule ******@102: 如果有违背建议规则的情况发生,必须有很好的理由。Every time a mendation is not followed, this must have a good reason.
好的理由并不包含个人****惯的风格。Good reasons do not include personal preferences of style.
Rule ******@105: 不要在一个文件中搀杂不同提供者的编码。Do not mix code from different providers in one file
一般而言,第三方代码都不会遵循我们的编码规范,所以,请不要将这样的代码放入我们的文件。In general, third party code will ply with the coding standard, so do not put such code in the same file as proprietary code.
命名规则Naming conventions
概述Overview
Rec. ******@101: 应英文来命名标识符。Use US-English for naming identifiers.
Rule ******@102: 用一般案例说明命名标识符。Use general casing for naming identifiers.
Rule ******@103: 不要使用如匈牙利语等不利于阅读或者用其他标识符来做标识符。Do not use Hungarian notation or add any other type identification to identifiers.
Rule ******@104: 成员字段用字母“m”做前缀。Prefix member fields with