Imports System.Runtime.Serialization.Formatters.Binary
Imports System.IO


        Dim oTools As BinaryFormatter = New BinaryFormatter \\序列化要用到的类
        Dim oStream As FileStream = New FileStream("Store Object Path", FileMode.OpenOrCreate) \\保存序列化后对象的流
        Dim oMyObject As Object = Your Object \\设置自己的对象
        oTools.Serialize(oStream, oMyObject) \\进行序列化
        Dim oMySerialize As Object = oTools.Deserialize(oStream) \\进行反序列化并获取对象

 

简单地记录如何序列化和反序列化,供自己以后查阅,同时亦方便大家。

相关文章:

  • 2021-07-13
  • 2022-12-23
  • 2022-02-12
  • 2021-08-12
  • 2021-12-20
  • 2021-05-17
猜你喜欢
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-06-28
  • 2021-06-08
相关资源
相似解决方案