c# timerCallback code introduction

黄舟
Release: 2017-03-04 10:14:41
Original
2223 people have browsed it

Consider this scenario: you need to complete a certain task regularly (for example, regularly go to the remote server to fetch data, and regularly update a certain field in the database etc.), for this type of business, C# has also been encapsulated, which can help us complete it conveniently.

Code snippet:

Code description: new created a TimerCallBack class, and pass it a delegate to tell it what tasks to complete on a regular basis. New A TimerPass four parameters at the same time:

l ##Object that needs callback

l Parameters to be passed to the delegate, null means no parameters

##l How long to delay execution

l Executed every few seconds

# After

##New, execution begins.

The above is the content of the c# timerCallback code introduction. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!