Pixel
Pixel
CC#
Created by Pixel on 4/3/2023 in #help
[System.Commandline] how to exit on --help
By default System.Commandline adds a --help which is nice but unlike the behavior of most POSIX programs the program does not exit when the --help option is added. How would i replicate this behavior?
24 replies
CC#
Created by Pixel on 1/23/2023 in #help
❔ File.WriteAllText(string, string?) and similar fail to write to file
Hi, im working on a Logger library and im trying different ways to implement logging to a file, but no matter what i tried (File.WriteAllText, File.WriteAllTextAsync, File.Append, FileStream.Write) they all end creating a file, but not writing to it the function for writing text to a file is as follow
private void File_WriteText(string ToPrint)
{
File.WriteAllText(LogFile, ToPrint);
}
private void File_WriteText(string ToPrint)
{
File.WriteAllText(LogFile, ToPrint);
}
LogFile and File_WriteText are both members of the OLog class, LogFile is a public string containing a path to the log file, by default it is log, if i missed any information do ask for more, the end result will most likely be open source anyways OS:: Arch Linux .NET:: 7.0/6.0 (both have the same issue)
19 replies