We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 975cee0 commit df28569Copy full SHA for df28569
snippets/csharp/System.Net/SocketAddress/Overview/source.cs
@@ -10,7 +10,7 @@ public static void MySerializeIPEndPointClassMethod(){
10
//<Snippet1>
11
12
//Creates an IpEndPoint.
13
-IPAddress ipAddress = Dns.Resolve("www.contoso.com").AddressList[0];
+IPAddress ipAddress = Dns.GetHostEntry("www.contoso.com").AddressList[0];
14
IPEndPoint ipLocalEndPoint = new IPEndPoint(ipAddress, 11000);
15
16
//Serializes the IPEndPoint.
0 commit comments