The # region and # endregion commands are used to mark a piece of code as a block with a given name, so that the code can be better laid out on the screen. For example:
/// <Summary>
/// Parses one line in a gedcom file.
/// </Summary>
Class gedcomline
{
# Region Fields
// Parts of the gedcom line.
Private int level;
Private string tag;
Private string data;
// Expression pattern used to parse the gedcom line.
Private readonly RegEx regsplit = new RegEx (
@"(? <Level> \ D +) \ s + (? <Tag> [\ s] +) (\ s + (? <DATA>. + ))? ");
// Expression pattern used to clean up the gedcom line.
// Only allow viewable characters.
Private readonly RegEx regclean = new RegEx (@ "[^ \ x20-\ x7e]");
// Expression pattern used to clean up the gedcom tag.
// Tag can contain alphanumeric characters, _,., or -.
Private readonly RegEx regtag = new RegEx (@ "[^ \ W.-]");
# Endregion
# Region Properties
/// <Summary>
/// Level of the tag.
/// </Summary>
Public int level
{
Get {return this. level ;}
Set {This. Level = value ;}
}
/// <Summary>
/// Line tag.
/// </Summary>
Public String tag
{
Get {return this. Tag ;}
Set {This. Tag = value ;}
}
/// <Summary>
/// Data of the tag.
/// </Summary>
Public String data
{
Get {return this. Data ;}
Set {This. Data = value ;}
}
# Endregion
.
.
.
}
In the vs editing view, you can zoom in:
/// <Summary>
/// Parses one line in a gedcom file.
/// </Summary>
Class gedcomline
{
Fields
Properties
.
.
.
}
Http://blog.sina.com.cn/s/blog_5d0279370100b6ep.html