Eugene
Eugene

Reputation: 1125

C# task repeat every x count

There are currently many solutions on StackOverflow using C# task to repeatedly do some work every x time interval. I would like to do it repeatedly to say every 100 counts of a counter. This counter is not time-based but is actually a number of values stored into an array for example. Is there any tutorial which could give an idea on how to implement this?

Upvotes: 1

Views: 280

Answers (1)

F. Iván
F. Iván

Reputation: 167

Something like this ?

if (i%100 == 0)
{
   // do something
}

Upvotes: 2

Related Questions