Visual Studio / C # code, similar to the #pragma sign in Xcode

Is there a code snippet in Visual Studio / C # similar to the Xcode #pragma mark ?

eg. When setting up #pragma mark Some Part Of Code in Xcode, the "Part of code" highlighted in bold is highlighted in the drop-down list of method enumerations, so you can use it to group methods according to their functionality and find them faster if necessary.

+4
source share
2 answers

I think you are looking for #region ?

Else, C # has #pragma , but from your description it looks like a region

+10
source

If you are working in C # with Xamarin Studio,

Go to:

Xamarin settings → Text editor → General → Then enable folding code

Then you can use

 #region SomeRegion //...Group of code... #endregion // end of MyRegion 
0
source

Source: https://habr.com/ru/post/1389653/


All Articles