I need to hide some comments which cannot be collapsed in some cases. What is the best practice to do it?
#region test
//var a = "comment";
#endregion
I need to hide some comments which cannot be collapsed in some cases. What is the best practice to do it?
#region test
//var a = "comment";
#endregion
There are some methods. But I prefer is using these two, since they are manageable:
Hide Selection command using shortcut keys: Simply select your code either it's comment or working code and the just press:
Ctrl+M, Ctrl+H -> to hide (this simply collapse your selected section and make small box preview)
Ctrl+M, Ctrl+U -> to uhide
Try using region:
#region region_name
//your stuff
#endregion