Q:

Serialize Hash Table of StreamReaders

Is it possible to serialize a hash table which has strings as keys and StreamReaders as values in c sharp? I want to read a bunch of files into an hash table and store the hash table in a binary file (and do this quite a few times). If so, how could I do this? I recall trying this some time back but the StreamReader or FileReader object I used was not serializable and it didn't work. Which object should I use? Or is this not possible?
If this is not possible, which would be the best way to store the files in the hash table? Think: 300 mb worth of text per file (but more realistically like 10 mb per file and about 10 of them). String? StringBuilder object?

A:

A Stream is just an abstraction of reading bytes from somewhere. If you want to store multiple files in one, you need to actually read the streams into byte arrays and serialize those.
If it's text files only, you can read them using File.ReadAllText and store the strings in a Dictionary<whatever, string>. Please don't use HashTable, it's horribly outdated by about half a decade. 

