Mismatched Curly Braces in C#

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

Hi FoxProMari,
Did you try Edit.FormatSelection in VS? That would pretty-format the code and you should see it straight away.
Otherwise, I guess a more elegant solution would be to write a regular expression to find it, but I don't have such an example ready.

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 :-)

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method.
So in this a…

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen.
Visualize your data! ... really see it
To use the code to create a calendar from a q…

Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video.
If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …