如题,能否将datatable转换为xml格式但只在内存中实现,再通过类开stream之类东西转成字节流传到对方,对方收到后再转换为xml也保存在内存中。

解决方案 »

  1.   

    to 如题,能否将datatable转换为xml格式但只在内存中实现,再通过类开stream之类东西转成字节流传到对方,对方收到后再转换为xml也保存在内存中。Sender solution as follows:
    1. Add your data table into dataset object;
    2. Create a memorystream object;
    3. Use "DataSet.WriteXml" method with memorystream object to write data with xml format.
    4. Read bytes from memory stream and send them. Reciever solution is to reverse the upper.