2002-04-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 18 Apr 2002 09:17:45 +0000 (09:17 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 18 Apr 2002 09:17:45 +0000 (09:17 -0000)
* Dns.cs (Resolve): behave as MS. Agreed with Mads.

svn path=/trunk/mcs/; revision=3892

mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/Dns.cs

index e066c80cc04fe4027f0d6302f6d1e6940976511f..37fb812c517d47e34ef1dc9aecfda2bae49bba16 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Dns.cs (Resolve): behave as MS. Agreed with Mads.
+
 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * IPAddress.cs: the icalls for sockets are endianness-aware. So I
index 510b4ab2dad87434ebb686690212efd089415e8e..6583ade8de56d27f0b731bd2bfd3959a1785b072 100644 (file)
@@ -187,7 +187,7 @@ namespace System.Net {
                 }
                 
                 /// <summary>
-                /// This method resovles a DNS-style host name or IP
+                /// This method resolves a DNS-style host name or IP
                 /// address.
                 /// </summary>
                 /// <param name=hostName>
@@ -197,11 +197,8 @@ namespace System.Net {
                 public static IPHostEntry Resolve(string hostName) {
                         if (hostName == null)
                                 throw new ArgumentNullException();
-                        try {
-                                return GetHostByAddress(hostName);
-                        } catch (SocketException) {
-                                return GetHostByName(hostName);
-                        }
+
+                       return GetHostByName (hostName);
                 }
         }
 }