Read log file being used by another process

前端 未结 2 1757
南旧
南旧 2020-12-31 02:37

Goal

I want to press a button on my GUI and read in the seclog.log file (symantec AV log) from a remote machine and display the contents of the log

2条回答
  •  抹茶落季
    2020-12-31 03:20

    using (StreamReader sr = new StreamReader(filePath, true))
    {
       sr.Close(); //This is mandatory
       //Do your file operation
    }
    

提交回复
热议问题