I have this in some unit test here on the assignment:
MyComplexObject dto = new MyComplexObject(); MemoryStream mem = new MemoryStream(); BinaryFormatter b = new BinaryFormatter(); try { b.Serialize(mem, dto); } catch (Exception ex) { Assert.Fail(ex.Message); }
It may help ... maybe another method might be better, but this one works well.
Patrick Desjardins Oct. 25 '08 at 15:47 2008-10-25 15:47
source share