-2
下面是一個示例:如何使用C#將List <int>轉換爲XML?
List<int> list=new List<int>(){1,2,3};
XElement XML=new XElement(/*...*/);
Console.WriteLine("print:"+XML);
預期結果:
//print:<root><item>1</item><item>2</item><item>3</item></root>