• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

风语者

风中我低语,愈远愈清晰
  • 博客园
  • 联系
  • 管理

公告

2005年8月22日

C# 代码标准 .NET2.0版(七)Security 编码指导方针

摘要: 1.Always demand your own strong name on assemblies and components that are private to the application, but are public (so that only you can use them):public class PublicKeys{ public const string MyCom... 阅读全文

posted @ 2005-08-22 17:22 风语者 阅读(1036) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(六)Remoting 编码指导方针

摘要: 1.Prefer administrative configuration to programmatic configuration.2.Always implement IDisposable on single-call objects.3.Always prefer a TCP channel and a binary format when using remoting, unless ... 阅读全文

posted @ 2005-08-22 17:21 风语者 阅读(1147) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(五)序列化Serialization 编码指导方针

摘要: 1.Prefer the binary formatter.2.Mark serialization event-handling methods as private.3.Use the generic IGenericFormatter interface.4.Always mark non-sealed classes as serializable.5.When implementing ... 阅读全文

posted @ 2005-08-22 17:20 风语者 阅读(1007) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(四)多线程编码指导方针

摘要: 1.Use synchronization domains. Avoid manual synchronization, because that often leads to deadlocks and race conditions.2.Never call outside your synchronization domain.3.Manage asynchronous call compl... 阅读全文

posted @ 2005-08-22 17:20 风语者 阅读(1262) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(三)项目设置和结构

摘要: 1.Always build your projects with Warning Level 4 2.Treat warnings as errors in the Release build (note that this is not the default of Visual Studio). Although it is optional, this standard recommend... 阅读全文

posted @ 2005-08-22 17:19 风语者 阅读(826) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(二)编码惯例和约定

摘要: 1.Avoid putting multiple classes in a single file.2.A single file should contribute types to only a single namespace. Avoid having multiple namespaces in the same file.3.Avoid files with more than 500... 阅读全文

posted @ 2005-08-22 17:18 风语者 阅读(1098) 评论(0) 推荐(0)

C# 代码标准 .NET2.0版(一)命名和风格

摘要: 1.Use Pascal casing for type and method names and constants:public class SomeClass{ const int DefaultSize = 100; public SomeMethod( ) {}}2.Use camel casing for local variable names and method argument... 阅读全文

posted @ 2005-08-22 17:15 风语者 阅读(996) 评论(0) 推荐(0)

 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3