region
and endregion
pragma
#pragma region
lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio editor.
Syntax
#pragma region
name
#pragma endregion
comment
Parameters
comment
(Optional) A comment to display in the code editor.
name
(Optional) The name of the region. This name displays in the code editor.
Remarks
#pragma endregion
marks the end of a #pragma region
block.
A #pragma region
block must be terminated by a #pragma endregion
directive.
Example
// pragma_directives_region.cpp
#pragma region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#pragma endregion Region_1
int main() {}
See also
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про