Iam looking for a way to match a full class, starting with the first bracket and ending with the closing bracket. I need this for an add-in, to limit the area the add-in should be applied to. My Problem is, that in those classes, there could be extra "sub-classes", also having brackets opening and closing. I would need a way to count those and ignore them until i find the right closing bracket of the first class.
Example:
public class Test
**{**
doSomeThing();
private partial class Test2
{
doSomeThing2();
}
**}**
I need the match from the first marked bracket to the last one.
Thanks for any help!