Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

C# coding convention

Grzegorz Mrukwa edited this page Mar 7, 2017 · 3 revisions

Convention

General

The C# coding convention has been described in detail here.

Ambiguities resolved

This section will enlarge as doubts will appear.

Current convention:

  • Private variables are started with underscore

IDisposable

Please keep in mind, that resources have to be maintained appropriately, even in presence of .NET's Garbage Collector. Proper implementation and using of IDisposable interface is obligatory.

Its usage may be simplified through using directive. How to implement IDisposable pattern is described in details here.

Note: Microsoft uses slightly different notation, than the rest of the world. They use terms managed and unmanaged oppositely.