上一篇:.net手机软件开发(5)——OBEX介绍 >>
.NET Framework General Reference - Capitalization Styles
Pascal case
The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. You can use Pascal case for identifiers of three or more characters. For example:
BackColor
Camel case
The first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized. For example:
backColor
Uppercase
All letters in the identifier are capitalized. Use this convention only for identifiers that consist of two or fewer letters. For example:
System.IO
System.Web.UI
You might also have to capitalize identifiers to maintain compatibility with existing, unmanaged symbol schemes, where all uppercase characters are often used for enumerations and constant values. In general, these symbols should not be visible outside of the assembly that uses them.
The following table summarizes the capitalization rules and provides examples for the different types of identifiers.
Identifier Case Example
Class Pascal AppDomain
Enum type Pascal ErrorLevel
Enum values Pascal FatalError
Event Pascal ValueChange
Exception class Pascal WebException
Note Always ends with the suffix Exception.
Read-only Static field Pascal RedValue
Interface Pascal IDisposable
Note Always begins with the prefix I.
Method Pascal ToString
Namespace Pascal System.Drawing
Parameter Camel typeName
Property Pascal BackColor
Protected instance field Camel redValue
Note Rarely used. A property is preferable to using a protected instance field.
Public instance field Pascal RedValue
Note Rarely used. A property is preferable to using a public instance field.
下一篇:Framework 类库的事件编程 >>
相关文章:
- · ADO.NET学习笔记(一)
- · .Net配置log4net
- · 一个经典的ADO.NET入门例子
- · 在.net使用代理浏览网页
- · .net 有关多态性的学习笔记。
- · 在.net中读写INI文件
- · 学习笔记《.NET框架程序设计(修订版)》--第三章 共享程序集 (3)
- · MyCollege.Net系统规划与总体设计
- · 学习笔记《.NET框架程序设计(修订版)》--第三章 共享程序集 (2)
- · Metadata and Reflection in .NET
- · 在.net执行sql脚本的简单实现
- · .Net下WebMethod属性
- · .NET客户端应用程序:.NET应用程序更新组件(6)
- · .NET客户端应用程序:.NET应用程序更新组件(5)
- · 创建分布式应用程序学习心得
- · 基于组件的.NET软件开发(1)
- · .net关于企业Excel报表的生成
- · 使用 Visual C# .NET 在 ADO.NET 中以编程方式构建连接字符串
- · 让用户通过宏和插件向您的 .NET 应用程序添加功能
- · Visual Basic.NET和GDI+共创图标编辑器
- · Visual Basic .NET 中动态加载类 (三)
- · Visual Basic .NET 中动态加载类 (二)
- · Visual Basic .NET 中动态加载类(一)
- · 我的.Net下应用程序发布问题的简易解决方案
- · 关于自定义事件的一点体会
- · .net 中的事务总结
- · .net中一些所封装的类
- · .Net 下对SqlServer2000中的存储过程的调用
- · .Net 下对SqlServer2000中的存储过程的调用
- · .NET组件和COM组件之间的相互操作
- · 权限管理工具的使用方法
- · .net关于企业Excel报表的生成
- · .NET Test Driven Development
- · 使用 Visual C# .NET 向 Microsoft Excel 2002 传输 XML 数据
- · Remoting编程知识二
- · Remoting编程知识一
- · 在.net中轻松掌握Windows窗体间的数据交互
- · .NET里面的Interop太烂了
