当前位置:网站首页>C# 编码规范手册
C# 编码规范手册
2022-08-02 05:17:00 【淡定九号】
C# 编码规范手册
引言
目的
明确C#编写的源程序和测试程序都符合相同的规范,达到一致性与统一性,以便于程序的后期维护和变更。
一个软件的生命周期中,80%的花费在于维护。几乎没有任何一个软件,在其整个生命周期中,均由最初的开发人员来维护;
编码规范可以改善软件的可读性,可以让程序员尽快而彻底地理解新的代码。为了执行规范,每个软件开发人员必须一致遵守编码规范;
使用统一编码规范的主要原因,是使应用程序的结构和编码风格标准化,以便于阅读和理解这段代码;
好的编码约定可使源代码严谨、可读性强且意义清楚,与其它语言约定相一致,并且尽可能的直观。
说明:编码规范是为了增加代码的可读性,没有所谓的对错,不必纠结于那样写对还是错。
术语定义
- Pascal 命名法:将标识符的首字母和后面连接的每个单词的首字母都大写。可以对三字符或更多字符的标识符使用 Pascal 大小写。例如: BackColor。
- Camel 命名法:标识符的首字母小写,而每个后面连接的单词的首字母都大写。例如: backColor。
- 大写:标识符中的所有字母都大写。仅对于由两个或者更少字母组成的标识符使用该约定。例如:System.IO,System.Web.UI。
- 文档的规范分为三种:【强制】【推荐】【参考】,表示规范需要遵循的级别
- 匈牙利命名法:匈牙利命名法是一种
边栏推荐
- Contents of encoding-indexes.js file printed with Bluetooth:
- nacos registry
- HCIP第十七天
- 洛谷小游戏大全(用洛谷的人都得知道)
- Linux CentOS8安装Redis6
- C语言基础知识梳理总结:零基础入门请看这一篇
- pl/sql之神奇的嵌套与变量生命周期
- A list of 300+ learning resources compiled by senior engineers of the Tao Department (the latest version in 2021)
- Machine learning -- - theory of support vector machine (SVM)
- [OpenCV from entry to practice] image processing technology [pixel] (the most detailed in the whole network)
猜你喜欢

classSR论文阅读笔记

【C语言】LeetCode26.删除有序数组中的重复项&&LeetCode88.合并两个有序数组

关于 VS Code 优化启动性能的实践

为什么4个字节的float要比8个字节的long大呢?

Meta公司内部项目-RaptorX:将Presto性能提升10倍

Features and installation of non-relational database MongoDB

Important concepts of target detection - IOU, receptive field, hole convolution, mAP

Polar Parametrization for Vision-based Surround-View 3D Detection Paper Notes

Google notes cut hidden plug-in installation impression

如何优化OpenSumi终端性能?
随机推荐
关于web应用的目录结构
Difference and analysis of CPU usage and load
Redis database
C语言入门实战(13):十进制数转二进制
A list of 300+ learning resources compiled by senior engineers of the Tao Department (the latest version in 2021)
高防服务器防御的原理是什么
如何进行并发数计算(稳定性测试和压力测试)?
H5 access payment process - WeChat payment & Alipay payment
pytorch常用函数
Polar Parametrization for Vision-based Surround-View 3D Detection Paper Notes
nacos registry
18 years of programmer career, read more than 200 programming books, pick out some essence to share with you
上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
51 MCU peripherals: ADC
测试环境要多少?从成本与效率说起
Smart people's game improvement: Chapter 3, Lesson 2: "Number of Tongtong" (number)
About the directory structure of the web application
Features and installation of non-relational database MongoDB
Mysql数据库 | 基于Docker搭建Mysql-8.0以上版本主从实例实战
淘系资深工程师整理的300+项学习资源清单(2021最新版)