Notes about System.Threading.Timer

You can fail to pass a state object to a System.Threading.Timer – you won’t see any values if you pass the instance to the timer’s constructor before initializing the values, as obviously a copy of the object is created.

The following does not work:

The timer will use 0 for object.Number.

The following, however, works as expected:

Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.