Posted By

jimfred on 07/29/09


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


#region/#endregion (or #pragma region/endregion in C++)lets you specify a block of code that you can expand or collapse when usi

 / Published in: C#


This is a means of applying a comment to a section of code so that it can be expanded or hidden as a group.

Use #pragma region in C/C++.

  1. // preprocessor_region.cs
  2. #region MyClass definition
  3. public class MyClass
  4. {
  5. public static void Main()
  6. {
  7. }
  8. }
  9. #endregion

Report this snippet  

You need to login to post a comment.