Răsfoiți Sursa

2003-04-11 Ville Palo <[email protected]>

	* StringReader.cs: Throws exceptions if constructor parameter is null.

svn path=/trunk/mcs/; revision=13505
Ville Palo 23 ani în urmă
părinte
comite
9d400a5cc7

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

@@ -1,3 +1,7 @@
+2003-04-11  Ville Palo <[email protected]>
+
+	* StringReader.cs: Throws exceptions if constructor parameter is null.
+	
 2003-04-11  Ville Palo <[email protected]>
 
 	* StringWriter.cs: Now throws an exception if StringBuilder parameter

+ 4 - 0
mcs/class/corlib/System.IO/StringReader.cs

@@ -18,6 +18,10 @@ namespace System.IO {
 		private int sourceLength;
 
 		public StringReader( string s ) {
+
+			if (s == null) 
+				throw new ArgumentNullException ();
+
 			this.source = s;
 			nextChar = 0;
 			sourceLength = s.Length;