I have a for loop to print a sets of addresses. But i want to do a condition where it skip printing the set of address that has the same value as postalCode-X.
So how to can i escape from a forloop? the language is in C#,.NET framework. thanks.
the DATA look like this:
SET 1
Street 1
California 1770
SET 2
Street 2
New Jersey 1990
SET 3
Street 3
Oakland 2000
Output with exception of postalcode 1990:
Print SET1 and SET3 only.
foreach (Dataset.Row dr in A.Rows)
{
if (dr.id("1"))
{
string unit = dr.unit;
string streetName = dr.street;
string postalCode = dr.postal;
content += String.Format("{0}", dr.name);
if (showAddress)
content += "<br/>" + GenAddr(unit,streetName, postalCode) + "<br/>";
}
}