简体   繁体   中英

How can I dynamically read XML files in a folder without refreshing my app using C#?

I have an application where I am loading XML files in a specific folder. I would like to automatically pick up any new XML files placed in a specific folder without refreshing or restarting my app.

Use the FileSystemWatcher . It allows you to monitor a specific directory and get an event when a file is created/changed/deleted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM