diff options
author | jbevain <jbevain@gmail.com> | 2011-04-04 21:15:44 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-04-04 21:15:44 +0400 |
commit | 497cd0f3c516a07cbe8735397fadb6e07be68191 (patch) | |
tree | 20f3acbc30951b2b27267b4062725dc8119fd831 /Mono.Collections.Generic | |
parent | a81852a1d3465b85b2c46a3a9e827dec36c86a04 (diff) |
Argument validation
Diffstat (limited to 'Mono.Collections.Generic')
-rw-r--r-- | Mono.Collections.Generic/Collection.cs | 3 |
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; |