2010-04-15 Jérémie Laval <jeremie.laval@gmail.com>
[mono.git] / mcs / class / corlib / System.Collections.Concurrent / ConcurrentDictionary.cs
index bf4e160a430e994a1daad94ab136b1cf2b519cf4..fb0774cee2ea84a6e69134fbfa6b13bc0f294fd6 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // ConcurrentSkipList.cs
 //
 // Copyright (c) 2009 Jérémie "Garuma" Laval
@@ -29,6 +28,8 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Runtime.Serialization;
 
+#if NET_4_0 || BOOTSTRAP_NET_4_0
+
 namespace System.Collections.Concurrent
 {
        public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>,
@@ -126,6 +127,8 @@ namespace System.Collections.Concurrent
 
                public bool TryAdd (TKey key, TValue value)
                {
+                       if (key == null)
+                               throw new ArgumentNullException ("key");
                        Basket basket;
                        bool taken = false;