Hello, I needed some help. I have this code:
XmlNodeList xnList = doc.GetElementsByTagName("Line");
foreach (XmlNode xn in xnList)
{
string salescode = xn["ProductCode"].InnerText;
if (salescode == code)
{
Console.WriteLine(salescode);
}
else;
}
And this code shows the following:
But when there are repeated numbers, I just want the first one to appear. How can I do this?