✅ System.IO.IOException Being Thrown
As stated above, a System.IO.IOException is being thrown. I believe it's being thrown because the Streamwriter is trying to write to a file that "doesn't exist", but I am creating the file before that code runs. Any ideas on what could be a solution? Thanks!
18 Replies
yeah but can you post the exception message?
you could try using File.OpenWrite instead of just creating an empty file

iirc
Oooh okay I'll have to look into using that, thanks for the help!
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
Ahhh sorry I'm quite new to this. The exception message must've not been showing because the exception was thrown at the end of the Applications lifetime
Anyways Kiel's solution did indeed work, thank you guys for all the help! It seems I still need to brush up on some more documentation..
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
Ahhh that's alot of stuff to brush up on. Is there a reason why the first word is usually full lowercase? I usually prefer to have all words capitalized
Yeahh I kinda just throw alot of stuff together to see if it works first, then I try and come back later to refine it
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
reason? no, not really. it's about consistency and giving you an easy way to tell at a glance whether a variable name is a
Property
, _field
, or localVariable
.
in my experience at leastAhhh okay yeah that makes sense
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
Yeah I think I get what you're saying. Currently I have no plans for working with anyone else, but I think it would be better for me to prepare now rather than later
When I get the time I'll make sure to go through my code and make it more user friendly
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
That's true actually, because clearly I need alot of help lol