Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Style guide for c#? [closed]

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++.

like image 248
yesraaj Avatar asked Jan 13 '11 08:01

yesraaj


People also ask

What is {} in C language?

Master C and Embedded C Programming- Learn as you go Braces{} − Opening and closing of curly braces indicates the start and end of a block of code which contains more than one executable statement.

Does C++ have a style guide?

C++ has features that are more surprising or dangerous than one might think at a glance. Some style guide restrictions are in place to prevent falling into these pitfalls. There is a high bar for style guide waivers on such restrictions, because waiving such rules often directly risks compromising program correctness.

How do you write C code?

Use good modular design. Use good error detection and handling. Always check return values from functions, and handle errors appropriately (SEGFAULT is not appropriate error handling).


1 Answers

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

like image 166
Billyhole Avatar answered Oct 06 '22 23:10

Billyhole