 |
|
 |
| |
Developer on focus
Anton Zamov is a dipl. engineer with more than 6 years of active professional
experience and many awards ...
read more>>
|
|
 |
 |
 |
|
 |
|
 |
| |
|
How to create and use System.Timers.Timer object
|
This example shows you how to create and use a Timer object.
The example will print "Hello" every second.
// create the timer set the event handler
Timer timer = new Timer();
// set the event handler
timer.Elapsed += new
ElapsedEventHandler(OnElapsed);
// set the timer properties
timer.Interval = 1000;
timer.AutoReset = true;
// start the timer
timer.Start();
void OnElapsed(Object sender, ElapsedEventArgs e)
{
// on timeout this code is executed
Console.WriteLine("Hello!");
}
|
About the author of this programming example or tutorial:
Anton Zamov is a software engineer with more than6 years
of active experience in web and software development and design.
Anton Zamov has extensive experience and broad knowledgebase
in C# and JAVA programming and has created a lot of
running e-commerce systems, portals and content management
systems using PHP and other web development technologies.
For more information about Anton Zamov, you may visit the personal web site of
Anton Zamov.
|
|
|
 |
 |
 |
|
|