I have 2 arrays communes and arrListStr.
I'm using if else to compare array element communes vs array arrListStr, but I want communes array to have to go through all elements in array arrListStr if there is no duplicate to last position then exception.
I'm confused and don't know what to do? Thanks if someone help me !
Here is the code :
/// communes list
/// arrListStr list
for (int a = 0; a < communes.Count; a++)
{
for (int b = 0; b < arrListStr.Length; b++)
{
if (communes[a].Name == arrListStr[b])
{
count++;
rtbResult.AppendText("\n" + " Successfully - " + count);
}
else
{
count++;
rtbResult.AppendText("\n" + " Fail - " + count);
}
}
}
rtbResultandcount. The information you're logging doesn't seem useful because you don't know which pair it refers to. What is your goal with these tiems?