IPHostEntry 類別

定義

提供網際網路主機位址資訊的容器 (Container) 類別。Provides a container class for Internet host address information.

public ref class IPHostEntry
public class IPHostEntry
type IPHostEntry = class
Public Class IPHostEntry
繼承
IPHostEntry

範例

下列範例會查詢 DNS 資料庫中有關主機 www.contoso.com 的資訊,並傳回 IPHostEntry 實例中的資訊。The following example queries the DNS database for information on the host www.contoso.com and returns the information in an IPHostEntry instance.

IPHostEntry^ hostInfo = Dns::GetHostEntry( "www.contoso.com" );
IPHostEntry hostInfo = Dns.GetHostEntry("www.contoso.com");
Dim hostInfo As IPHostEntry = Dns.GetHostEntry("www.contoso.com")

備註

IPHostEntry 類別會將網域名稱系統(DNS)主機名稱與別名陣列和相符 IP 位址的陣列產生關聯。The IPHostEntry class associates a Domain Name System (DNS) host name with an array of aliases and an array of matching IP addresses.

IPHostEntry 類別會當做具有 Dns 類別的 helper 類別使用。The IPHostEntry class is used as a helper class with the Dns class.

建構函式

IPHostEntry()

初始化 IPHostEntry 類別的新執行個體。Initializes a new instance of the IPHostEntry class.

屬性

AddressList

取得或設定與主機關聯的 IP 位址清單。Gets or sets a list of IP addresses that are associated with a host.

Aliases

取得或設定與主機關聯的別名清單。Gets or sets a list of aliases that are associated with a host.

HostName

取得或設定主機的 DNS 名稱。Gets or sets the DNS name of the host.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱