Deserialization of XML to Hashtable

This code sample shows how to work on Deserialization of XML to Hashtable .

using System.Runtime.Serialization.Formatters.Soap;
private Hashtable SearchParams()
Hashtable htSearchParams=new Hashtable();
FileStream fs = new FileStream("Set the Path", FileMode.Open);
SoapFormatter formatter = new SoapFormatter();
htSearchParams = (Hashtable)formatter.Deserialize(fs);
return htSearchParams;
catch (Exception ex)
throw ex;



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: