SERIALIZE:
FileStream fStream = new FileStream(ConfigurationManager.AppSettings[1].ToString(), FileMode.Open); BinaryFormatter bin = new BinaryFormatter(); htObject = bin.Deserialize(fStream) as Hashtable; |
DESERIALIZE:
Stream binstream = File.OpenWrite(ConfigurationManager.AppSettings[1].ToString()); BinaryFormatter binFmtr = new BinaryFormatter(); binFmtr.Serialize(binstream, m_hashTable); binstream.Close(); |
This can be useful in XNA programming. More C++ for DirectX9 posts will be coming next week.
No comments:
Post a Comment