Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Winforms 应用程序,它可以更改 ip 配置信息并将其输出到 json 文件中。如果用户更改文件中的信息以便配置信息再次更新,我想引发一个事件。我该怎么做呢?
只需使用 try / catch,因为如果编辑配置文件,则会发生错误。所以在像这样的捕捉使用中
try { } catch(Exception ex) { if(ex != null) { }