T deserialize(String s){ XmlSerializer xml = new XmlSerializer(typeof(T)); byte[] buf = Encoding.UTF8.GetBytes(s); MemoryStream ms = new MemoryStream(buf); T obj=(T)xml.Deserialize(ms); return obj;
单选题
T deserialize(String s){ XmlSerializer xml = new XmlSerializer(typeof(T)); byte[] buf = Encoding.UTF8.GetBytes(s); MemoryStream ms = new MemoryStream(buf); T obj=(T)xml.Deserialize(ms); return obj;