Hello all,
I'm having a problem with file io. Here's my code, though already suspect it has little to do with the problem...
Random rand = new Random(DateTime.Now.Millisecond); // random is a function that I made.
int i = 0;
while (i < 100)
{
StreamWriter newstream = new StreamWriter("output.txt");
newstream.WriteLine(rand.GenerateRand());
++i;
}
Anyways, I'm getting a system.security.securityexception as soon as the executable starts. I googled it and found that it probably has to do with the fact that I'll be writing directly to a network share and the permissions being inherited do not allow for direct file-io. I couldn't find how to change them, however. Can someone point me in the right direction here Thanks!
Visual C#13
|