1
Answer

accessing the embedded xml

Ask a question
ksmloh

ksmloh

20y
1.9k
1
I have embedded an xml file into the project itself using VS, "Adding Existing Item" and setting the xml file's property as embedded resource. But how do i access it? I only worked out the following but i could not read the file: System.Resources.ResourceManager resources = new System.Resources.ResourceManager(this.GetType()); System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader((System.IO.Stream)(resources.GetObject("my.xml")));

Answers (1)