Parcourir la source

2008-06-10 Stephane Delcroix <[email protected]>

	* IPAddress: allow usage on 2.1

svn path=/trunk/mcs/; revision=105425
Stephane Delcroix il y a 17 ans
Parent
commit
1c4ef08b79

+ 4 - 0
mcs/class/System/System.Net/ChangeLog

@@ -1,3 +1,7 @@
+2008-06-10  Stephane Delcroix  <[email protected]>
+
+	* IPAddress: allow usage on 2.1
+
 2008-06-08  Miguel de Icaza  <[email protected]>
 
 	* ResponseStream.cs: Do not Close the HttpResponse object here as

+ 4 - 0
mcs/class/System/System.Net/IPAddress.cs

@@ -224,7 +224,11 @@ namespace System.Net {
 					string lastNet = nets [nets.Length - 1];
 					if (lastNet.Length == 0)
 						return null;
+#if NET_2_1
+					foreach (char c in lastNet.ToCharArray ())
+#else
 					foreach (char c in lastNet)
+#endif
 						if (!Uri.IsHexDigit (c))
 							return null;
 				}