I have this little snippet that I have been playing with to see how and why things work.
FileStream strm;
try
{
strm = new FileStream(fpath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
}
catch (Exception e)
{
Console.WriteLine (e);
Console.WriteLine ("Cannot open StrmSeek.txt " +
"for reading and writing");
return;
This works but everytime it clears out the file and start fresh? And this does not work.
try
{
FileStream strm = new FileStream(fpath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
}
catch (Exception e)
{
Console.WriteLine (e);
Console.WriteLine ("Cannot open StrmSeek.txt " +
"for reading and writing");
return;
Don't rememeber the exact error but this will throught a lot in the rest of the code.
And with either example my snippet does not have this.
strm.Close();
Does it matter to close it or not.
Thanks for any help in making this readable.
Mod Edit: Please use code tags when posting your code. Code tags are used like so =>
Thanks,
PsychoCoder

New Topic/Question
Reply




MultiQuote





|