Is there a timer class in C# that isn't in the Windows.Forms namespace?
问题 I want to use a timer in my simple .NET application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application. Is there a C# timer (or timer like) class for use in console applications? 回答1: System.Timers.Timer And as MagicKat says: System.Threading.Timer You can see the differences here: http://intellitect.com/system-windows-forms-timer-vs-system-threading-timer-vs-system-timers-timer/ And you can see