I'm building a WinForm application to manage some very simple data (on an embedded .txt file) that I want to access and modify. Using the StreamReader works to access the data, but when it comes modifying it, that code throws the "Stream was not writable" exception:
System.Reflection.Assembly thisExe; //The first 3 lines are from msdn
thisExe = System.Reflection.Assembly.GetExecutingAssembly();
Stream str = thisExe.GetManifestResourceStream("a.b.txt");
StreamWriter sw = new StreamWriter(str);
I tried the Stream.CanWrite property but it is read only.
Is there a way to obtain the CanWrite permission on that textfile?