8
使用下面的代碼,定時器只觸發一次。我錯過了什麼?System.Threading.Timer只會觸發一次
public static List<string> Test = new List<string> { "TEST1", "TEST2" };
public static void Start()
{
var t = new System.Threading.Timer(o =>
{
foreach (var item in Test)
{
Console.WriteLine("Say hello!");
}
}, null, 0, 1250);
}