Style guide for c#? [closed]

2019-01-12 14:09发布

I like style guide used by google for c++, published here . Is there any similar style guide available for c# also? I'm looking for more of good practices along with simple things like naming just like in google style guide for c++.

5条回答
爷的心禁止访问
2楼-- · 2019-01-12 14:41

I have found IDesign to be one of the most comprehensive coding standards documents around. It covers things like naming conventions and other best practice elements. You can download a copy from here: IDesign C# Coding Standard

查看更多
Deceive 欺骗
3楼-- · 2019-01-12 14:42

See if ICSharpCoding guideline helps you. Otherwise if you are telling that you liked Google's C++ guideline, you can adopt it. Main point is that entire team is agreeing to it and following it.

查看更多
一夜七次
4楼-- · 2019-01-12 14:49

I've been creating one for my development team by combining parts of all the good / great ones that I've been able to find. Here are links to the ones I am using...

Microsoft - Design Guidelines for Class Library Developers - http://msdn.microsoft.com/en-us/library/ms229042.aspx

IDesign C# Coding Standard - http://www.idesign.net/idesign/download/IDesign CSharp Coding Standard.zip

SubMain C# / VB.NET Coding Guidelines - http://submain.com/products/guidelines.aspx

Lance Hunt - C# Coding Standards - http://weblogs.asp.net/lhunt/archive/2004/08/17/CSharpCodingStandardsv113.aspx

DotNetSpider - C# Coding Standards and Best Programming Practices - http://www.dotnetspider.com/tutorials/BestPractices.aspx

Microsoft – C# Programming Guide - http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx

Phillips Medical Systems - Coding Standard C# - http://www.tiobe.com/content/paperinfo/gemrcsharpcs.pdf

查看更多
【Aperson】
5楼-- · 2019-01-12 14:50

You may want to have a look at StyleCop.

查看更多
倾城 Initia
6楼-- · 2019-01-12 14:59

Microsoft has finally published C# Coding Conventions used to develop documentation.
For naming conventions and design guidelines refer to Framework Design Guidelines by Microsoft.

查看更多
登录 后发表回答