Click here to Skip to main content
15,913,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i've been using your "Fast Serialization" code for quite some time, and up until now without any issues.
When working with BinaryFormatter, i'm able to serialize and de-serialize using your great fast serializer code, however i can't seem to be able to use it when working with DataContractSerializer.

the following code snippet works with the fast serializer:

BinaryFormatter bformatter = new BinaryFormatter();
bformatter.Serialize(stream, dataset);
stream.Close();
bformatter = new BinaryFormatter();
TDataSetType newDs = (TDataSetType)bformatter.Deserialize(stream);
stream.Close();

the following code does not work with the fast serializer:

DataContractSerializer dcSerializer = new DataContractSerializer(typeof(TDataSetType));
dcSerializer.WriteObject(stream, dataset);
stream.Close();
dcSerializer = new DataContractSerializer(typeof(TDataSetType));
TDataSetType newDs = (TDataSetType)dcSerializer.ReadObject(stream);
stream.Close();

What should i do in order to step into the Fast Serializer, also when using the DataContractSerializer (as oppose to the BinaryFormatter)?

Thanks! ;)
Posted
Updated 30-Jun-10 4:58am
v2

1 solution

At the bottom of all of the articles on CP are forums. If your question is specific to an article, you need to ask your question in that forum.

Chances are that the author of the article won't see your quick answer question and chances are that the majority of us have never seen the article or use the code in it.

Your best chance of getting an answer that helps is to ask it at the forum on the articles page, not in here.

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900