Hi,
I have this code:
and i want the informatiom that i give. ('Pink') be given by a textbox
How can i do it? thanks
- private void button1_Click(object sender, EventArgs e)
- {
- XDocument doc = XDocument.Load(@"C:\Work\stores.xml");
- var xpath = "//store/Color[text() ='Pink']";
- var result = ((IEnumerable)doc.XPathEvaluate(xpath)).Cast
().FirstOrDefault(); - textBox1.Text = result.Value;
- }
César GoulartPosted Feb 10, 2020, 6:03 AM
Bhawna TutejaPosted Feb 9, 2020, 10:35 PM