📅  最后修改于: 2022-03-11 14:49:07.480000             🧑  作者: Mango
void Main()
{
String aciResponseData = "test ";
using(TextReader sr = new StringReader(aciResponseData))
{
var serializer = new System.Xml.Serialization.XmlSerializer(typeof(MyClass));
MyClass response = (MyClass)serializer.Deserialize(sr);
Console.WriteLine(response.bar);
}
}
[System.Xml.Serialization.XmlRoot("tag")]
public class MyClass
{
public String bar;
}