Tutorial by Examples

Using comments in your projects is a handy way of leaving explanations of your design choices, and should aim to make your (or someone else's) life easier when maintaining or adding to the code. There are a two ways of adding a comment to your code. Single line comments Any text placed after // w...
A region is a collapsible block of code, that can help with the readability and organisation of your code. NOTE: StyleCop's rule SA1124 DoNotUseRegions discourages use of regions. They are usually a sign of badly organized code, as C# includes partial classes and other features which make regions o...
XML documentation comments can be used to provide API documentation that can be easily processed by tools: /// <summary> /// A helper class for validating method arguments. /// </summary> public static class Precondition { /// <summary> /// Throws an <see cref...

Page 1 of 1