I have the following code:
foreach (XNode rowXml in elements.Nodes())
{
foreach (DataRow rowDB in dataSetDB.Tables[0].Rows)
{
string itemDB = rowDB[0].ToString().ToUpper();
string itemXml = rowXml.ToString().ToUpper();
if (itemDB == itemXml)
{
//If itemDB == itemXml; jump to Outer_Foreach
}
if (itemDB != itemXml)
{
//If itemDB != itemXml; jump to Outer_Foreach
}
}
How is it possible to get out of Inner-Foreach and up to Outer-Foreach, and still keep both foreach where you left it. I am looping through a DB and XML table rows. Break; completley jumps out of the Inner-Foreach and im not able to catch where I left it, so I start back on index[0], when I loop through it over and over again.