views:

486

answers:

2

When working on C#, I often do this:

#region Properties
  public int Property1{get;set;}
  ...(more properties)
#endregion

This makes Visual Studio add the option to fold the code inside the region. Offcourse, you can use regions for anything, it's not limited to Properties or anything at all.

I'm wondering 2 things:

  1. Is this just something to make Visual Studio add code folding to an area of the editor or does it affect the compiler?
  2. Can I do something similar in Netbeans?
+3  A: 
  1. (In Netbeans at least) It is purely a programmer aid and has no effect on compilation
  2. Yes you can

One caveat to the folding reference:

Please note that the above examples are for java language. In other languages custom folds may not be supported or you may have to use different characters for marking line comments.

Rich Seller
I was aiming for PHP and it works.
WebDevHobo