I have a ForEach loop that processes a rather large list of contacts. Instead of doing a bunch of processing in this main loop, I call a method which in turn calls a method, etc. Methods call other methods in other classes, maybe other namespaces.
How do I break from the current method if a condition is detected and I want to move on to the next contact? I'm in a method a few levels from the main ForEach loop.
Typically, you could use the continue keyword inside a ForEach to skip to the next element in the collection. continue is not an option in this case. When I type continue, it gets underlined in red with a "Unresolved Message" comment.
So, what do I do?