Miss Princess
New Member
I have this example code in my c# win form...\[code\]List<string> listFurniture = new List<string>();XDocument xml = XDocument.Load(Application.StartupPath + @"\Furniture.xml");foreach (XElement quality in xml.Descendants("Quality")) listFurniture.Add(quality.Value);maintextbox.Text = listFurniture[0];\[/code\]... And this example xml\[code\]<Furniture> <Table> <Quality>textbox1.Text + "and" + textbox2.Text + "but" + textbox3.Text</Quality> ... </Table> </Furniture>\[/code\]My dilemma is, the maintextbox is producing the actual string "\[code\]textbox1.Text\[/code\]", instead of the value of textbox1.I want the xml value to be read as:\[code\]maintextbox.Text = textbox1.Text + "and" + textbox2.Text + "but" + textbox3.Text;\[/code\]not as:\[code\]maintextbox.Text = "textbox1.Text + "and" + textbox2.Text + "but" + textbox3.Text";\[/code\]I tried using a text file as well with \[code\]StreamReader\[/code\] and I got the same result.The reason for coding my project this way is because the sequence of the textboxes changes and so does the "and" and the "but". When that change happens, I wouldn't have to rewrite the code and recompile the program. I would just make the changes in xml.