C# Timer : Run function in interval time
Apa itu Timer function di dalam .NET C#?
~ ~ ~
Contoh code
public Form1()
{
InitializeComponent();
timer1 = new Timer();
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Interval = 5000; // in miliseconds
timer1.Start();
}
Rujukan
Execute specified function every X seconds - https://stackoverflow.com/a/6169305/10763264
C# - how do you stop a timer? - https://stackoverflow.com/a/4563738/10763264
Ulasan