简体   繁体   English

自动重复读取文件

[英]Reading a file auto-repeatedly

Using Visual Studio 2012 C#, I will make a program to open and read a text file within some periods auto-repeatedly. 使用Visual Studio 2012 C#,我将制作一个程序,在某些时间段内自动重复打开和读取文本文件。

Like this auto-repeat action, what kind of features should i use to be smooth process ? 像这种自动重复动作一样,我应该使用哪种功能才能使过程平稳? In this meantime, the other program will write this text file as well ? 在此期间,其他程序也将写入此文本文件。

Background worker ? 后台工作者? any more suitable? 更合适吗?

thank you. 谢谢。

Easiest and most effective way is to use timer. 最简单,最有效的方法是使用计时器。 When timer fires you can use background worker to open text file and do some work then. 当计时器触发时,您可以使用后台工作程序打开文本文件,然后执行一些工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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