When i hit the assert i was surprise bc i expected my implementation to be correct. It should work but didnt so i wrote the code below and comment out the assert and find. Why does my code work and find does not?
var z = n.Find(v[i], false);
//Debug.Assert(z.Count() == 1);
//n = z[0].Nodes;
if (z.Count() != 1)//count == 0
{
for (int ii = 0; ii < n.Count; ii++)
{
if (n[ii].Text == v[i])
{
n = n[ii].Nodes;
break;
}
}
}