zoukankan      html  css  js  c++  java
  • 数组和datatable间的相互转换[C#]

     byte[] LogMsgByte = null;    

                    DataTable dtMessageInfo = new DataTable();

                    //将datatable转换为数组               

                    dtMessageInfo.TableName = "MSGInfoName";
                    MemoryStream streamSaveUldByte = new MemoryStream();
                    dtMessageInfo.WriteXml(streamSaveUldByte, XmlWriteMode.WriteSchema);
                    LogMsgByte = streamSaveUldByte.ToArray();

                    //将数组转换为datatable
                    MemoryStream stream = new MemoryStream(LogMsgByte);
                    dtMessageInfo.ReadXml(stream);

  • 相关阅读:
    jenkins持续集成
    对pm2对研究
    模板⽅法模式
    python configparser模块
    Python正则表达式
    Python读写文件之换行符
    Python字符串
    Python字典
    Python列表
    爬虫 urllib,requests,lxml,bs4 小结
  • 原文地址:https://www.cnblogs.com/Echo529/p/6382667.html
Copyright © 2011-2022 走看看