Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by Amit on Nov 19th, 2008 | Filed under .Net, C# | 4 Comments

Lately I have been playing around with serializing and deserializing of objects, and I stumbled upon a very weird behavior. I was trying to serialize a certain object that was implementing the INotifyPropertyChanged Interface. I marked the object as [Serializable] and used the following method to serialize it:

   1: public void SerializeNow()
   2: {
   3:    Stream s = File.Create("Data.dat");
   4:    BinaryFormatter b = new BinaryFormatter();
   5:    b.Serialize(s, data);
   6:    s.Close();
   7: }

Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More