Just sharing some of my inconsequential lunch conversations with you... RSS  

Friday, February 01, 2008

Serializing HashTable

Ok, dictionaries can't be serialized to Xml, but we can always use SoapFormatter:

	SoapFormatter SOAPFormatter = new SoapFormatter();
Stream myStream = ...;

SOAPFormatter.Serialize(myStream, obj);

stream.Close();

Well, not always, actually. Human just can't read it. But it can be sent over the wire - at least to another .NET ecosystem :)

No comments:

Development Catharsis :: Copyright 2006 Mário Romano