Does anyone know a good way to find out where I have an extra #region or #endregion in my code? I have about 5,000 lines of C # code, and I'm trying to do it manually right now. Any help is appreciated.
Do CTRL+ M CTRL+ L- to close all regions. Then expand them one at a time on the left (small sign +) until you see #region XXXwhich one does not have a match#endregion
+
#region XXX
#endregion
It should look like this:
Inconsistency http://i51.tinypic.com/j92at5.jpg
Ctrl+M, M, . , , , .
Ctrl+M, M
, , ?
CTRL + M CTRL + O -
He must collapse everything except the area with the mismatch.
I just had this problem,
The easiest way to find out where I deleted endregion is to compare with the last file in the source control.
the line was highlighted and easy to find.