Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2011-04-04 21:15:44 +0400
committerjbevain <jbevain@gmail.com>2011-04-04 21:15:44 +0400
commit497cd0f3c516a07cbe8735397fadb6e07be68191 (patch)
tree20f3acbc30951b2b27267b4062725dc8119fd831 /Mono.Collections.Generic
parenta81852a1d3465b85b2c46a3a9e827dec36c86a04 (diff)
Argument validation
Diffstat (limited to 'Mono.Collections.Generic')
-rw-r--r--Mono.Collections.Generic/Collection.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mono.Collections.Generic/Collection.cs b/Mono.Collections.Generic/Collection.cs
index 1137978..7579e74 100644
--- a/Mono.Collections.Generic/Collection.cs
+++ b/Mono.Collections.Generic/Collection.cs
@@ -115,6 +115,9 @@ namespace Mono.Collections.Generic {
public Collection (ICollection<T> items)
{
+ if (items == null)
+ throw new ArgumentNullException ("items");
+
this.items = new T [items.Count];
items.CopyTo (this.items, 0);
this.size = this.items.Length;