Created a resource file .resx, then added to it an existing .xml file. Now it is not clear how to read this .xml file from the resource file .resx.
PS When reading the same .xml file from the file system, there were no problems.
Did you create a resource in a standard way, through project properties?
Then the resource can be accessed simply by name (I have TestXml ):
var content = Properties.Resources.TestXml; var doc = XDocument.Parse(content); Console.WriteLine(doc); The program issues:
<root> <test /> </root> Source: https://ru.stackoverflow.com/questions/519046/
All Articles