| title | region, endregion | ||||
|---|---|---|---|---|---|
| ms.date | 10/18/2018 | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | c697f807-622f-4796-851b-68a42bbecd84 |
#pragma region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.
#pragma region name
#pragma endregion comment
comment
(Optional) A comment that will display in the code editor.
name
(Optional) The name of the region. This name will display in the code editor.
#pragma endregion marks the end of a #pragma region block.
A #region block must be terminated with #pragma endregion.
// pragma_directives_region.cpp
#pragma region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#pragma endregion Region_1
int main() {}