-
Book Overview & Buying
-
Table Of Contents
Visual Studio 2010 Best Practices
By :
Syntax isn't the only thing that matters when it comes to writing code. We can't get far without getting past the compiler, but not everything that compiles is of acceptable quality. Practices and techniques beyond being "syntactically correct" are so important that there are entire third-party ecosystems devoted to detecting common issues and patterns in source code and in compiled code.
This chapter isn't about many of the issues that code analysis tools detect, but details some practices that can be used with C# to avoid certain pitfalls and improve quality. We'll look at recommended practices in the following areas:
.NET generics
Sequences and iterator members
Lambdas
Extension methods
Exception handling
Change the font size
Change margin width
Change background colour