I debuger it.
var id = pos.Descendants("div").Where(x => x.GetAttributeValue("id", "") == i + "-" + j); //
id is getting null after it go to foreach there
if(id!=null)
{
foreach(var n in id)// at here id still is null return at x.GetAttributeValue("id", "") == i + "-" + j) and go to "}" tag at bottom
}
else //
It was not checking this part.
{
............
}
}//
and it will be there "}" is close other tag
I dont understand Why was It return "else?.