<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>命名 on 墨山灼海 | 个人技术分享站</title>
    <link>https://moshanzhuohai.com/tags/%E5%91%BD%E5%90%8D/</link>
    <description>Recent content in 命名 on 墨山灼海 | 个人技术分享站</description>
    <generator>Hugo</generator>
    <language>zh-Hans-CN</language>
    <managingEditor>1009840925@qq.com (墨山灼海)</managingEditor>
    <webMaster>1009840925@qq.com (墨山灼海)</webMaster>
    <lastBuildDate>Sun, 22 Nov 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://moshanzhuohai.com/tags/%E5%91%BD%E5%90%8D/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>墨山的 C# 代码风格规范 - 命名</title>
      <link>https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/</link>
      <pubDate>Sun, 22 Nov 2026 00:00:00 +0000</pubDate><author>1009840925@qq.com (墨山灼海)</author>
      <guid>https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/</guid>
      <description>&lt;h2 id=&#34;目录&#34;&gt;目录&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#%e7%9b%ae%e5%bd%95&#34;&gt;目录&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1-%e9%80%9a%e7%94%a8&#34;&gt;1. 通用&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#11-%e5%a4%a7%e5%b0%8f%e5%86%99&#34;&gt;1.1. 大小写&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#111-pascal-case&#34;&gt;1.1.1. Pascal Case&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1111-%e8%af%b4%e6%98%8e&#34;&gt;1.1.1.1. 说明&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1112-%e9%80%82%e7%94%a8%e8%8c%83%e5%9b%b4&#34;&gt;1.1.1.2. 适用范围&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#112-camel-case&#34;&gt;1.1.2. Camel Case&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1121-%e8%af%b4%e6%98%8e&#34;&gt;1.1.2.1. 说明&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1122-%e9%80%82%e7%94%a8%e8%8c%83%e5%9b%b4&#34;&gt;1.1.2.2. 适用范围&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#113-upper-snake-case&#34;&gt;1.1.3. Upper Snake Case&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1131-%e8%af%b4%e6%98%8e&#34;&gt;1.1.3.1. 说明&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1132-%e9%80%82%e7%94%a8%e8%8c%83%e5%9b%b4&#34;&gt;1.1.3.2. 适用范围&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12-%e7%bc%a9%e5%86%99%e5%92%8c%e7%ae%80%e5%86%99&#34;&gt;1.2. 缩写和简写&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#121-%e7%bc%a9%e5%86%99&#34;&gt;1.2.1. 缩写&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#1211-%e7%bc%a9%e5%86%99%e5%8d%95%e8%af%8d%e8%ae%b8%e5%8f%af%e8%a1%a8&#34;&gt;1.2.1.1. 缩写单词许可表&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12111-%e5%9f%ba%e7%a1%80&#34;&gt;1.2.1.1.1. 基础&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12112-%e6%95%b0%e6%8d%ae%e6%a0%bc%e5%bc%8f&#34;&gt;1.2.1.1.2. 数据格式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12113-%e7%bd%91%e7%bb%9c%e5%8d%8f%e8%ae%ae&#34;&gt;1.2.1.1.3. 网络协议&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12114-%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f&#34;&gt;1.2.1.1.4. 文件格式&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#12115-%e7%94%a8%e6%88%b7%e7%95%8c%e9%9d%a2&#34;&gt;1.2.1.1.5. 用户界面&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#122-%e7%ae%80%e5%86%99&#34;&gt;1.2.2. 简写&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#2-%e9%80%9a%e7%94%a8%e7%ba%a6%e5%ae%9a&#34;&gt;2. 通用约定&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#21-%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4&#34;&gt;2.1 命名空间&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#22-%e5%88%ab%e5%90%8d&#34;&gt;2.2. 别名&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#23-%e6%8e%a5%e5%8f%a3&#34;&gt;2.3. 接口&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#24-%e6%9e%9a%e4%b8%be&#34;&gt;2.4. 枚举&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#241-%e6%99%ae%e9%80%9a%e6%9e%9a%e4%b8%be&#34;&gt;2.4.1. 普通枚举&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#242-%e6%a0%87%e5%bf%97%e6%9e%9a%e4%b8%be&#34;&gt;2.4.2. 标志枚举&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#243-%e6%9e%9a%e4%b8%be%e5%85%83%e7%b4%a0&#34;&gt;2.4.3. 枚举元素&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#25-%e6%b3%9b%e5%9e%8b%e5%8f%82%e6%95%b0&#34;&gt;2.5. 泛型参数&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#26-%e5%a7%94%e6%89%98&#34;&gt;2.6. 委托&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#27-%e5%ad%97%e6%ae%b5&#34;&gt;2.7. 字段&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#28-%e5%b1%9e%e6%80%a7&#34;&gt;2.8. 属性&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#29-%e4%ba%8b%e4%bb%b6&#34;&gt;2.9. 事件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#210-%e6%96%b9%e6%b3%95&#34;&gt;2.10. 方法&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#211-%e5%8f%82%e6%95%b0&#34;&gt;2.11. 参数&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#212-%e5%b1%80%e9%83%a8%e5%8f%98%e9%87%8f&#34;&gt;2.12. 局部变量&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3-%e7%89%b9%e6%ae%8a%e7%ba%a6%e5%ae%9a&#34;&gt;3. 特殊约定&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#31-%e7%b1%bb%e5%9e%8b&#34;&gt;3.1. 类型&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#311-%e9%9d%99%e6%80%81%e7%b1%bb%e5%9e%8b&#34;&gt;3.1.1. 静态类型&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3111-%e9%80%9a%e7%94%a8%e5%b7%a5%e5%85%b7&#34;&gt;3.1.1.1. 通用工具&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3112-%e6%89%a9%e5%b1%95%e6%96%b9%e6%b3%95%e5%ae%b9%e5%99%a8&#34;&gt;3.1.1.2. 扩展方法容器&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3113-%e5%ba%95%e5%b1%82-api-%e5%b0%81%e8%a3%85%e5%ba%93&#34;&gt;3.1.1.3. 底层 API 封装库&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3114-%e4%b8%ad%e5%bf%83%e5%8c%96%e7%ae%a1%e7%90%86%e5%99%a8&#34;&gt;3.1.1.4. 中心化管理器&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#312-%e5%ae%9e%e4%be%8b%e7%b1%bb%e5%9e%8b&#34;&gt;3.1.2. 实例类型&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3121-%e7%bb%a7%e6%89%bf&#34;&gt;3.1.2.1. 继承&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#313-%e6%9e%9a%e4%b8%be&#34;&gt;3.1.3. 枚举&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3131-%e6%a0%87%e5%bf%97%e6%9e%9a%e4%b8%be&#34;&gt;3.1.3.1. 标志枚举&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#32-%e6%88%90%e5%91%98&#34;&gt;3.2. 成员&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#321-%e5%b8%83%e5%b0%94%e6%88%90%e5%91%98&#34;&gt;3.2.1. 布尔成员&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#322-%e9%9b%86%e5%90%88%e6%88%90%e5%91%98&#34;&gt;3.2.2. 集合成员&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#323-%e6%8c%87%e9%92%88%e6%88%90%e5%91%98&#34;&gt;3.2.3. 指针成员&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#324-%e7%bb%93%e6%9e%84%e4%bd%93%e5%ad%97%e6%ae%b5&#34;&gt;3.2.4. 结构体字段&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#325-%e9%9d%9e%e5%bc%95%e7%94%a8%e9%9d%99%e6%80%81%e5%8f%aa%e8%af%bb%e5%ad%97%e6%ae%b5&#34;&gt;3.2.5. 非引用静态只读字段&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#326-%e5%86%85%e9%83%a8%e6%96%b9%e6%b3%95&#34;&gt;3.2.6. 内部方法&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#327-%e6%b6%88%e6%81%af%e5%ae%9e%e4%be%8b%e6%96%b9%e6%b3%95&#34;&gt;3.2.7. 消息实例方法&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#328-%e5%b8%83%e5%b0%94%e8%bf%94%e5%9b%9e%e5%80%bc%e6%96%b9%e6%b3%95&#34;&gt;3.2.8. 布尔返回值方法&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#329-%e8%a7%92%e5%ba%a6%e5%8f%82%e6%95%b0&#34;&gt;3.2.9. 角度参数&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#3210-%e6%9c%af%e8%af%ad&#34;&gt;3.2.10. 术语&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#%e5%8f%a6%e8%af%b7%e5%8f%82%e8%a7%81&#34;&gt;另请参见&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#%e9%99%84%e5%bd%95&#34;&gt;附录&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://moshanzhuohai.com/posts/csharp/style/csharp-code-style-name/#%e5%b8%b8%e8%a7%81%e7%ae%80%e5%86%99%e5%8d%95%e8%af%8d%e5%af%b9%e7%85%a7%e8%a1%a8&#34;&gt;常见简写单词对照表&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;1-通用&#34;&gt;1. 通用&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;strong&gt;[禁止]&lt;/strong&gt;&lt;/em&gt; 使用匈牙利命名法。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;11-大小写&#34;&gt;1.1. 大小写&lt;/h3&gt;
&lt;h4 id=&#34;111-pascal-case&#34;&gt;1.1.1. Pascal Case&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;大驼峰命名法（帕斯卡命名法）&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
  </channel>
</rss>
