Skip to Main Content
C# in a Nutshell
book

C# in a Nutshell

by Ben Albahari, Ted Neward, Peter Drayton
March 2002
Intermediate to advanced content levelIntermediate to advanced
864 pages
31h 8m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell

Chapter 22. C# Naming and Coding Conventions

Naming conventions have long been understood to be a beneficial practice in software development, for a variety of reasons elucidated more clearly and persuasively elsewhere. The benefits of a naming convention, however, take special meaning in the cross-language environment that .NET offers — for the first time, a class library written in C# can be accessed verbatim from VB, C++, Eiffel, and any other “.NET-consumer” language, compiler, or environment. While “industry practices” are hard to discuss in an industry that has yet to even ship its first release, Microsoft has released some guidelines to its own naming conventions, used predominantly in the Framework Class Library; even if you and your development shop choose to use alternative conventions, understanding the naming conventions of the FCL is key to using it effectively.

There are three elements of naming guidelines:

  • Case (capitalization)

  • Mechanics (class names, method names, and so on)

  • Word choice (consistent terminology and phraseology)

Much of this information can also be found in the Microsoft documentation set.

Case

Throughout the years, computer scientists have never been able to agree on one common way in which to express human-readable concepts (including word breaks for compound names such as “XML reader” or “input stream”) in arenas in which normal rules of English, such as spaces, cannot apply. As a result, various languages have used different rules and formats to indicate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 8.0 in a Nutshell

C# 8.0 in a Nutshell

Joseph Albahari, Eric Johannsen
C# 10 in a Nutshell

C# 10 in a Nutshell

Joseph Albahari
C# in a Nutshell, Second Edition

C# in a Nutshell, Second Edition

Peter Drayton, Ben Albahari, Ted Neward
Code like a Pro in C#

Code like a Pro in C#

Jort Rodenburg

Publisher Resources

ISBN: 0596001819Catalog PageErrata