I have a bit of code that looks like this:
text = reg.Replace(text, new MatchEvaluator(MatchEvalStuff));
I need to pass in a 2nd parameter like this:
text = reg.Replace(text, new MatchEvaluator(MatchEvalStuff, otherData));
Is this possible, and what would be the best way to do this?
Sorry, I should have mentioned that I’m using 2.0, so I don’t have access to lambdas. Here is what I ended up doing:
This way I can create a ‘MyMethod’ method and pass it whatever parameters I need to (param1 and param2 are just for this example, not the code I actually used).