using System; using System.Runtime.Serialization; using System.Collections; class X { static void Main (){ SerializationInfo i = new SerializationInfo (typeof (Hashtable), new FormatterConverter ()); StreamingContext c = new StreamingContext (StreamingContextStates.All); Hashtable h = new Hashtable (); h.GetObjectData (i, c); foreach (SerializationEntry x in i){ Console.WriteLine ("{0} {1}", x.Name, x.Value); } } }