IList implementation: convert NullReferenceException to ArgumentException
authorRaja R Harinath <harinath@hurrynot.org>
Fri, 31 Jul 2009 10:25:04 +0000 (10:25 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Fri, 31 Jul 2009 10:25:04 +0000 (10:25 -0000)
commitf741a048f0e550627b0adcb9d411eeb0716e1eb5
tree9398b72d2251cf92108845a1fd2d21f092ca47b1
parent99764f539cfacc9ad1f0955ad6db0bafb4b7fc36
IList implementation: convert NullReferenceException to ArgumentException

* List.cs (IList.this.set): Convert NullReference and InvalidCast
exceptions into ArgumentExceptions.
(IList.Add, IList.Contains, IList.IndexOf, IList.Insert, IList.Remove):
Convert NullReferenceException to ArgumentException.
* ListTest.cs: Add a few testcases for IList interface, using null
values with a List<int>.

svn path=/trunk/mcs/; revision=139159
mcs/class/corlib/System.Collections.Generic/ChangeLog
mcs/class/corlib/System.Collections.Generic/List.cs
mcs/class/corlib/Test/System.Collections.Generic/ChangeLog
mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs