为什么我的返回内容总是为空;
using (MemoryStream ms = new MemoryStream())
{
StreamWriter sw = new StreamWriter(ms, System.Text.Encoding.GetEncoding(1252));
XDocument xdoc = new XDocument(root);
xdoc.Save(sw);
using (StreamReader sr = new StreamReader(ms, System.Text.Encoding.GetEncoding(1252), true))
{
string content = sr.ReadToEnd();
return content;
}
}