当程序不是 运行 时检测文件夹中的文件更改

detecting file changes in folder when program is not running

我检查过 FileSystemWatcher 监视的文件夹实际上不检查或告诉文件夹中的更改,而程序不是 运行。如何在程序关闭时查看文件夹中的更改?我的意思是,程序如何告诉 'the changes in the folder when the program is off'?

如果您想知道更改已经发生何时发生,您将需要使用服务(参见此处:https://docs.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications)。