This is the example of reading serialized custom object reding from .DAT file
ObjectToSerialize objectToSerialize;
Stream stream = File.Open(filename, FileMode.Open);
BinaryFormatter bFormatter = new BinaryFormatter();
objectToSerialize = (ObjectToSerialize)bFormatter.Deserialize(stream);
stream.Close();
return objectToSerialize;
You could use 'String' Instead of 'ObjectToSerialize' ( because your .DAT contains string rather then custom object)
Please
vote and
Accept Answer if it Helped.