<?xml version="1.0" encoding="utf-8"?> <Items> <Item> <ItemText>1/2"</ItemText> <ItemValue>0.5</ItemValue> </Item> </Items>
var users = from person in xmlDoc.Descendants("Items").Elements("Items") where person.Element("ItemText").Value == cmbRodDiameter.SelectedItem.ToString() select new { ItemValue = person.Element("ItemValue").Value, }; foreach (var items in users) { txtRodDValue.Text = items.ItemValue; } //here combobox value is passing 1/2"\" //insted of 1/2" that's y not came the result so how can I do.
xmlDoc.Descendants("Items").Elements("Items")
xmlDoc.Descendants("Items").Elements("Item")
cmbRodDiameter.SelectedItem.ToString()
cmbRodDiameter.SelectedValue.ToString()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)