Geeks With Blogs
Geekswithblogs

The coding standards for native C++ and .NET (C# and VB.NET) programming used by the All-In-One Code Framework team is now available to everyone. The Microsoft All-In-One Code Framework project team writes code samples based on this guideline.

Download: http://1code.codeplex.com/releases

The coding standards are continuously evolving. If you discover a new best practice or a topic that is not covered, please bring that to the attention of the All-In-One Code Framework Project Group (onecode@microsoft.com). I look forward to appreciating your contributions.  :-)

codingstandards.png
 
 
Table of Contents

1      Overview........................................................................................................ 1

1.1      Principles & Themes................................................................................. 1

1.2      Terminology................................................................................................. 1

2      General Coding Standards........................................................................ 3

2.1      Clarity and Consistency............................................................................ 3

2.2      Formatting and Style.................................................................................. 3

2.3      Using Libraries............................................................................................ 5

2.4      Global Variables.......................................................................................... 5

2.5      Variable Declarations and Initalizations.................................................. 5

2.6      Function Declarations and Calls.............................................................. 6

2.7      Statements................................................................................................... 8

2.8      Enums........................................................................................................... 8

2.9      Whitespace................................................................................................. 13

2.10   Braces.......................................................................................................... 14

2.11   Comments.................................................................................................. 15

2.12   Regions....................................................................................................... 23

3      C++ Coding Standards............................................................................. 25

3.1      Compiler Options...................................................................................... 25

3.2      Files and Structure.................................................................................... 26

3.3      Naming Conventions................................................................................ 27

3.4      Pointers....................................................................................................... 30

3.5      Constants................................................................................................... 31

3.6      Casting........................................................................................................ 32

3.7      Sizeof........................................................................................................... 32

3.8      Strings......................................................................................................... 33

3.9      Arrays........................................................................................................... 34

3.10   Macros......................................................................................................... 35

3.11   Functions.................................................................................................... 35

3.12   Structures.................................................................................................... 38

3.13   Classes....................................................................................................... 38

3.14   COM............................................................................................................... 44

3.15   Allocations.................................................................................................... 45

3.16   Errors and Exceptions................................................................................ 46

3.17   Resource Cleanup...................................................................................... 48

3.18   Control Flow.................................................................................................. 50

4      .NET Coding Standards.............................................................................. 54

4.1      Design Guidelines for Developing Class Libraries.............................. 54

4.2      Files and Structure...................................................................................... 54

4.3      Assembly Properties.................................................................................. 54

4.4      Naming Convensions................................................................................ 54

4.5      Constants..................................................................................................... 57

4.6      Strings........................................................................................................... 58

4.7      Arrays and Collections................................................................................ 59

4.8      Structures....................................................................................................... 61

4.9      Classes.......................................................................................................... 62

4.10   Namespaces................................................................................................. 65

4.11   Errors and Exceptions................................................................................. 65

4.12   Resource Cleanup....................................................................................... 68

4.13   Interop.............................................................................................................. 80

 

Posted on Tuesday, September 7, 2010 11:18 PM | Back to top


Comments on this post: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
How can one find changes you've made to guidlines since earlier version?
Left by Patryk Zera on Sep 08, 2010 7:10 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
Good question! I'm thinking about using "Track Change" feature of Word so reader can easily find the changes we've made.
Left by Jialiang Ge on Sep 08, 2010 8:59 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
Thanks for consideration.
Left by Patryk Zera on Sep 09, 2010 7:49 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
.net use full some windows application
Left by shyam on Jan 01, 2011 10:50 PM

# millage
Requesting Gravatar...
Great post I have to admit. Simple yet somehow interesting and engaging. Keep up the awesome work!Web designing vishakapatnam
Left by Web designing vishakapatnam on Sep 08, 2011 7:11 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
I think you have an programming encyclopedia here! You must have take a lot of time and I congrats your efforts into bringing this to everybody. Good work grama sintética
Left by Joaquim on Oct 05, 2011 8:31 AM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
Interesting framework, I will read through it tonight after work. Thanks for sharing!
Left by Gonzi on Dec 09, 2011 6:43 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
I am happy when reading your blog with updated information! Essays term papers | Law school personal statement
Left by hunny on Dec 11, 2011 8:37 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
The topic that your blog deals with demands loads of research.This kind of blog always useful for blog readers, valentines day cards
Left by buddyz on Feb 07, 2012 3:23 AM

# Code framework
Requesting Gravatar...
Dot NET programmers have to decide starting dozens of taxing frameworks earlier than setting upon the dreary task of separately scrutiny every part of code for Independence Day Quotes
correct process,
Left by Sabiston on Aug 09, 2012 3:18 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
Thanks for the link, just need to look through some of this coding. Personally, most of my programming has been in the area of PHP and HTML of recent.
Left by Uchenna on Dec 28, 2013 12:35 AM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
I absolutely love your blog and find most of your post's to be precisely what I'm looking for. Does one offer guest writers to write content for yourself? I wouldn't mind creating a post or elaborating on a number of the subjects you write in relation to here. Again, awesome website!
Paid Apk for free
Left by DJ on Nov 03, 2015 4:16 PM

# re: VC++, C#, VB.NET Coding Guideline of All-In-One Code Framework
Requesting Gravatar...
Thank you for sharing this e-book to guide me more about C# and VB.NET. Just download it and learn more about the code.

Tech News
Left by Tim Berty on May 02, 2016 1:25 AM

Your comment:
 (will show your gravatar)


Copyright © Geekswithblogs | Powered by: GeeksWithBlogs.net