Link to home
Start Free TrialLog in
Avatar of Mariyam
Mariyam

asked on

Mismatched Curly Braces in C#

Hello,

Does anyone know of a trick or a good way to figure out how to find the missing opening or closing brace in your code?

I have a function that is about 1500 lines long and contains several IF-THEN-ELSE structures and I'm having the worse time trying to figure out what's missing.  Any suggestions will be GREATLY appreciated.  TIA

-Mari

ASKER CERTIFIED SOLUTION
Avatar of Ramuncikas
Ramuncikas
Flag of Lithuania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
#Region' and '#End Region' statements are not valid within method bodies.
At least thats what VB 2005 Express Edition says
Avatar of Mariyam
Mariyam

ASKER

Hello,

Thanks to all who answered.  I ended up pulling out each section of code and putting it into a function using the Switch command to ascertain which function to execute.  I started to do it this way but ended up going off on a tangent and this mess is the result of that adventure.

If none of you mind, I'll split the points among you because they all look like good suggestions.  Hopefully I'll get to test them on a more manageable block of code :-)

Thanks again!

-Mari