In a normal loop you can break out of a loop using break. Can the same be done using an anonymous delegate?
Example inputString and result are both declared outside
As others have posted, you can't exit the loop in ForEach.
Are you able to use LINQ? If so, you could easily combine TakeWhile and a custom ForEach extension method (which just about every project seems to have these days).
In your example, however, List