Hi all,
I am currently working with the StreamWriter class. I am using the constructor which has a string filepath for its parameter. The constructor should look like:
I wanna write to a file named "exceptions.log". This is how I create the instance of the StreamWriter:
Now, my question is, why is .net tried to create a "C:\WINDOWS\system32\exceptions.log"? Is "C:\WINDOWS\system32" a default file path? If so, how do I change it?
This is not that big of a problem though. Im just curious. I could easily input the absolute path or use the Application.StartUpPath and the like.
Thx.
I am currently working with the StreamWriter class. I am using the constructor which has a string filepath for its parameter. The constructor should look like:
Code:
StreamWriter(string filename)
I wanna write to a file named "exceptions.log". This is how I create the instance of the StreamWriter:
Code:
StreamWriter sw = New StreamWriter("exceptions.log")
Now, my question is, why is .net tried to create a "C:\WINDOWS\system32\exceptions.log"? Is "C:\WINDOWS\system32" a default file path? If so, how do I change it?
This is not that big of a problem though. Im just curious. I could easily input the absolute path or use the Application.StartUpPath and the like.
Thx.