Skip to content

Visual Studio

Visual Studio does not treat ReSharper’s formatter-off comments as native formatting controls. A #region names a collapsible code region; it does not protect its contents from formatting.

#region DoNotFormat
var tempHack = "manually preserved";
// Add comments or notes here
#endregion

Use this snippet for organization and folding only. The name DoNotFormat has no special formatting behavior.