C# (C sharp) is a general-purpose, multi-paradigm programming language developed by Microsoft. JoinAGILE-iTECH lean C#, and develop desktop applications, mobile applications, games, and much more.

1. Development Process

The development process is where bugs and defects start. Take advantage of tools that help you avoid or find these problems before you release:

Coding Standards

Consistent use of a standard can lead to more maintainable code, especially in code bases written and maintained by multiple developers or teams. Tools such as FxCop, StyleCop, and ReSharper are commonly used to enforce coding standards.

Developers: Carefully consider violations and analysis results before suppressing them. They identify problems in code paths that are less unusual than you expect.

Code Review

Code review and pair programming are common practices that task developers with deliberately reviewing source code written by others. Others will hopefully recognize mistakes made by the author, such as coding or implementation bugs.

Code review is a valuable practice, but it is fallible by nature of relying on humans and can be difficult to scale.

2. Type Gotchas

One of C#’s major strengths is its flexible type system; type safety helps catch errors early. By enforcing strict type rules, the compiler is able to help you maintain sane coding practices. The C# language and .NET framework provide a rich collection of types to accommodate the most common needs. Most developers have a good understanding of the common types and their uses, but there are some common misunderstandings and misuses.

More information about the .NET Framework Class Library can be found in the MSDN library.

Understand and use the standard interfaces

Certain interfaces relate to idiomatic C# features. For example, IDisposable allows the use of common resource-handling idioms such as the “using” keyword. Understanding when to use the interfaces will enable you to write idiomatic C# code that is easier to maintain.

Avoid ICloneable—the designers never made it clear whether a cloned object was intended to be a deep or shallow copy. Since there is no standard for correct behavior of a cloned object, there’s no ability to meaningfully use the interface as a contract.