Skip to content

Commit 1fe281b

Browse files
nycdotnetRon Petrusha
authored andcommitted
Specify that this will use the hosts file and not only DNS (#2248)
* Specify that this will use the hosts file and not only DNS This method uses DNS resolution rules like ping, not like nslookup. * code review feedback * restore no extra line at bottom
1 parent 19521d6 commit 1fe281b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xml/System.Net/Dns.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,9 @@
708708
If an empty string is passed as the `hostNameOrAddress` argument, then this method returns the IPv4 and IPv6 addresses of the local host.
709709
710710
IPv6 addresses are filtered from the results of the <xref:System.Net.Dns.GetHostAddresses%2A> method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty <xref:System.Net.IPAddress> instance if only IPv6 results were available for the `hostNameOrAddress` parameter.
711-
711+
712+
This method is implemented using the underlying operating system's name resolution APIs (such as the Win32 API getaddrinfo on Windows, and equivalent APIs on other platforms). If a host is described in the `hosts` file, the IP address or addresses there will be returned without querying the DNS server.
713+
712714
> [!NOTE]
713715
> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](~/docs/framework/network-programming/network-tracing.md).
714716
@@ -1298,6 +1300,8 @@
12981300
IPv6 addresses are filtered from the results of this method if the local computer does not have IPv6 installed. As a result, it is possible to get back an empty <xref:System.Net.IPHostEntry> instance if only IPv6 results where available for the `hostNameOrAddress`.parameter.
12991301
13001302
The <xref:System.Net.IPHostEntry.Aliases%2A> property of the <xref:System.Net.IPHostEntry> instance returned is not populated by this method and will always be empty.
1303+
1304+
This method is implemented using the underlying operating system's name resolution APIs (such as the Win32 API getaddrinfo on Windows, and equivalent APIs on other platforms). If a host is described in the `hosts` file, the IP address or addresses there will be returned without querying the DNS server.
13011305
13021306
> [!NOTE]
13031307
> This member emits trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](~/docs/framework/network-programming/network-tracing.md).

0 commit comments

Comments
 (0)