I have some questions regarding how I can write to text files as I want to produce a log:
1) I attempted to put the path name into a string variable, but the compiler won't accept the "\" character as in "D:\MyLogfilesFolder\LogStrategy1.txt". So how do I tell the strategy where the file is located?
2) I intend to use File.AppendAllText(MyFile, MyText) to add text to the file. Will that work or do I also need to initialize anything (beyond MyFile and MyText as string variables)?
3) MyFile would need to include path AND filename, right?
4) Would it be possible to have several strategies all writing to a master log file? From what I read about the command File.AppendAllText() it will close the file right after appending the new text. So it should be ready for other strategies to write to it, or could that lead to an error?
Thanks,
NutFlush
Comment