D
Daryll SHatz
Does serialization work on custom data types via structures?
Dim bFormatter As New BinaryFormatter()
Dim sFile As FileStream = File.Create(FilePath)
Dim structure As myStruct
Dim val1 as Integer
Dim Val2 as String
End Structure
Dim aStruct as myStruct
aStruct.val1 = 123
aStruct.val2 = "some text"
bFormatter.Serialize(sFile, aStruct)
sFile.Close()
Everytime I use serialization on structures I get a PublicKeyToken=null is
not marked as serializable error. I can find much on serialization. Does
the object need some special interface to be serializ-able?
Dim bFormatter As New BinaryFormatter()
Dim sFile As FileStream = File.Create(FilePath)
Dim structure As myStruct
Dim val1 as Integer
Dim Val2 as String
End Structure
Dim aStruct as myStruct
aStruct.val1 = 123
aStruct.val2 = "some text"
bFormatter.Serialize(sFile, aStruct)
sFile.Close()
Everytime I use serialization on structures I get a PublicKeyToken=null is
not marked as serializable error. I can find much on serialization. Does
the object need some special interface to be serializ-able?