[c#] Breaking out of a nested loop

That's how I did it. Still a workaround.

_x000D_
_x000D_
foreach (var substring in substrings) {_x000D_
  //To be used to break from 1st loop._x000D_
  int breaker=1;_x000D_
  foreach (char c in substring) {_x000D_
    if (char.IsLetter(c)) {_x000D_
      Console.WriteLine(line.IndexOf(c));_x000D_
      \\setting condition to break from 1st loop._x000D_
      breaker=9;_x000D_
      break;_x000D_
    }_x000D_
  }_x000D_
  if (breaker==9) {_x000D_
    break;_x000D_
  }_x000D_
}
_x000D_
_x000D_
_x000D_

Examples related to c#

How can I convert this one line of ActionScript to C#? Microsoft Advertising SDK doesn't deliverer ads How to use a global array in C#? How to correctly write async method? C# - insert values from file into two arrays Uploading into folder in FTP? Are these methods thread safe? dotnet ef not found in .NET Core 3 HTTP Error 500.30 - ANCM In-Process Start Failure Best way to "push" into C# array

Examples related to for-loop

List append() in for loop Prime numbers between 1 to 100 in C Programming Language Get current index from foreach loop how to loop through each row of dataFrame in pyspark TypeScript for ... of with index / key? Is there a way in Pandas to use previous row value in dataframe.apply when previous value is also calculated in the apply? Python for and if on one line R for loop skip to next iteration ifelse How to append rows in a pandas dataframe in a for loop? What is the difference between ( for... in ) and ( for... of ) statements?

Examples related to nested-loops

Single Line Nested For Loops How to break out of nested loops? Breaking/exit nested for in vb.net bash shell nested for loop Iterate Multi-Dimensional Array with Nested Foreach Statement How to break nested loops in JavaScript? Can I use break to exit multiple nested 'for' loops? How do I break out of nested loops in Java? Breaking out of nested loops Breaking out of a nested loop