我有以下代码,它写了一些数据,但不是全部。什么可以削减我的数据?
using (var stream = new MemoryStream())
{
XmlTextWriter xwr = new XmlTextWriter(stream, Encoding.UTF8);
service.getXElement.WriteTo(xwr);
byte[] bytes = stream.ToArray();
writeStream.Write(bytes, 0, bytes.Length);
}