Kaynağa Gözat

2009-06-25 Miguel de Icaza <[email protected]>

	* Timer.cs: Throw ArgumentNullException if the callback is null. 

svn path=/trunk/mcs/; revision=136912
Miguel de Icaza 16 yıl önce
ebeveyn
işleme
1601b10bbf

+ 4 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,7 @@
+2009-06-25  Miguel de Icaza  <[email protected]>
+
+	* Timer.cs: Throw ArgumentNullException if the callback is null. 
+
 2009-06-22  Bill Holmes  <[email protected]>
 
 	* Thread.cs : Adding interrupt_on_stop field.

+ 3 - 0
mcs/class/corlib/System.Threading/Timer.cs

@@ -178,6 +178,9 @@ namespace System.Threading
 
 		void Init (TimerCallback callback, object state, long dueTime, long period)
 		{
+			if (callback == null)
+				throw new ArgumentNullException ("callback");
+			
 			this.callback = callback;
 			this.state = state;