B
Bob Weiner
Hi,
I'm an IT guy who likes to think he can program. I have a generic question
about filestreams.
I'm putting together an application and need to write certain activities out
to a log file. I created a Log class to manage all file operations.
The class has Open, Close, and Record methods. I don't understand how the
FileStream object functions, though. If I create the object with FileMode =
OpenOrCreate and FileAccess = ReadWrite it seems I should be able to
attach/detach a StreamWriter object as necessary.
In fact, it works fine until I close the StreamWriter. When I reopen I find
the the FileStream is no longer writeable.
Is there a simple explanation to correct my misunderstanding of the
FileStream or a good tutorial on how they work that I should read. Forgive
me for not searching more on my own but I'm late for a meeting and I have to
get this code out the door asap.
Thanks, bob
I'm an IT guy who likes to think he can program. I have a generic question
about filestreams.
I'm putting together an application and need to write certain activities out
to a log file. I created a Log class to manage all file operations.
The class has Open, Close, and Record methods. I don't understand how the
FileStream object functions, though. If I create the object with FileMode =
OpenOrCreate and FileAccess = ReadWrite it seems I should be able to
attach/detach a StreamWriter object as necessary.
In fact, it works fine until I close the StreamWriter. When I reopen I find
the the FileStream is no longer writeable.
Is there a simple explanation to correct my misunderstanding of the
FileStream or a good tutorial on how they work that I should read. Forgive
me for not searching more on my own but I'm late for a meeting and I have to
get this code out the door asap.
Thanks, bob