我有这个代码:
string log_file_name = @"\logger.txt";
string logger_file_to_read = Path.GetDirectoryName(Application.LocalUserAppDataPath) + @"\log";
string LoggerFile = Path.Combine(logger_file_to_read, log_file_name);
Run Code Online (Sandbox Code Playgroud)
我使用断点,我看到:logger_file_to_read包含:
C:\ Users\bout0_000\AppData\Local\Diagnostic_Tool_Blue_Screen\Diagnostic Tool Blue Screen\log
而log_file_name包含:
\ logger.txt
但后来我发现LoggerFile只包含文件名:\ logger.txt没有目录.
这是什么?