zhshqzyc
asked on
Break foreach loop
var strings = new string[] { .... };
foreach (string item1 in strings)
{
// doing something
foreach (string item2 in strings)
{
if( item1==item2)
// want to break foreach loop
}
}
3x
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Open in new window