摘要:
public static void Main() { // Create a Timer object that knows to call our TimerCallback // method once every 2000 milliseconds. Timer t = new Timer(TimerCallback, null, 0, 2000); // Wait for the user to hit <Enter> Console.ReadLine(); } private static void TimerCallback(Object o) { // Displa 阅读全文
摘要:
private static void Demo1() { try { Console.WriteLine("In try"); } finally { // Type1!ˉs static constructor is implicitly called in her Type1.M(); } } private sealed class Type1 { static Type1() { // if this throws an exception, M won!ˉt get calle Console.WriteLine("Type1's static 阅读全文