如何在C#中将输出保存在xml文件中

时间:2018-08-28 16:24:51

标签: c# .net xml

我正在使用C#代码,其中将输出存储在锯齿状数组中,并希望加载为xml格式,所以请帮助我。 谢谢 命名空间ConsoleApp10 {     班级计划     {         静态void Main(string [] args)         {             ushort [] data = new ushort [5] {1,2,3,4,5};             对于(int j = 1; j <= 5; j ++)             {                 string [] [] jagg =新的string [6] [];                 jagg [1] =新字符串[5] {data [0] .ToString(),data [1] .ToString(),data [2] .ToString(),data [3] .ToString(),data [4 ] .ToString()};                 对于(int i = 0; i <= 4; i ++)                 {                     字符串[]时间=新字符串[1] {DateTime.Now.ToString(“ HH:mm:ss.fff”)};                     jagg [0] =时间;                     Console.WriteLine(“ values:” + jagg [1] [i]);                     Console.WriteLine(“ time:” + jagg [0] [0]);                 }                 Console.WriteLine(“ -----------------------”);             }         }

0 个答案:

没有答案