C# Windows Phone 7将资源字符串值设置为.xml

C# Windows Phone 7将资源字符串值设置为.xml,c#,windows-phone-7,C#,Windows Phone 7,是否可以将.resx中的字符串设置为项目中的.xml 比如说, 名称=文件名值=Project.Objects.File.xml注释=我的xml文件 然后解析资源名,而不是输入resource.Filename之类的“file.xml” var streamInfo = Application.GetResourceStream(new Uri(Resource.FileName, UriKind.Relative)); XDocument xdoc; using

是否可以将.resx中的字符串设置为项目中的.xml

比如说,

名称=文件名值=Project.Objects.File.xml注释=我的xml文件

然后解析资源名,而不是输入resource.Filename之类的“file.xml”

var streamInfo = Application.GetResourceStream(new Uri(Resource.FileName, UriKind.Relative));
        XDocument xdoc;
        using (var s = streamInfo.Stream)
            xdoc = XDocument.Load(s);

我希望这样做,但显然这不起作用:(

回答我自己的问题,但在这里没有得到回应

事实证明,我不需要为文件名字符串上的值设置文件路径。只需将该值设置为examplefile.xml,即可使ResourceStream正常工作