Region Blocks C# with Example



Region Blocks C# with Example

Use #region and #endregion to define a collapsible code region. 
#region Event Handlers 
public void Button_Click(object s, EventArgs e) 
{ 
// ... 
} 
public void DropDown_SelectedIndexChanged(object s, EventArgs e) 
{ 
// ... 
} 
#endregion 
These directives are only beneficial when an IDE that supports collapsible regions (such as Visual Studio) is used to 
edit the code. 

0 Comment's

Comment Form

Submit Comment