Answer the question
In order to leave comments, you need to log in
How to write code to collapse its snippets in NetBeans?
I got a long method in the class. I use NetBeans for editing.
What special characters should be used for code folding, as in, for example, in the function: if, foreach?
In C#, the #region code was used for this
<?php
#region Комментарий.
echo " Рабочий код ";
#endregion;
<?php
#region Комментарий и скрытый код.
// <editor-fold defaultstate="collapsed" desc="comment">
Answer the question
In order to leave comments, you need to log in
If you have a huge sheet of code that doesn't contain "natural" regions to hide, then something is wrong with your code.
The best practices of all popular programming languages say that the body of the function should fit on the screen, and sometimes even be no more than 10-15 lines.
There are times when large chunks of code are justified, but if you have them so often that you need a way to wrap them up...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question