A
Atul
I cant figure out how to serialize and later deserialize
a binary chunk of data. For example how can I serialize a
bitmap image. I tried to find out how the Image class in
the framework acheives this but I could not.
For example, say I have a class
[Serializable]
public class Sample : ISerializable
{
Byte blob[]; // this byte array can be of variable length
....
....
};
Currently, the following is the only way apparent to me
to acheive this.
In the GetObjectData funcion, I encode the byte array to
a string and then use the AddValue function to add the
string.
During derialization, I call GetString to retrieve the
string and decode it to get the original byte array.
How can I serialize a byte array directly without
converting it to an encoded string first? ( I see no
overloads which take a byte array)
Thanks
Atul
a binary chunk of data. For example how can I serialize a
bitmap image. I tried to find out how the Image class in
the framework acheives this but I could not.
For example, say I have a class
[Serializable]
public class Sample : ISerializable
{
Byte blob[]; // this byte array can be of variable length
....
....
};
Currently, the following is the only way apparent to me
to acheive this.
In the GetObjectData funcion, I encode the byte array to
a string and then use the AddValue function to add the
string.
During derialization, I call GetString to retrieve the
string and decode it to get the original byte array.
How can I serialize a byte array directly without
converting it to an encoded string first? ( I see no
overloads which take a byte array)
Thanks
Atul