IPAddress.Equals(Object) 方法

定義

比較兩個 IP 位址。Compares two IP addresses.

public:
 override bool Equals(System::Object ^ comparand);
public override bool Equals (object comparand);
override this.Equals : obj -> bool
Public Overrides Function Equals (comparand As Object) As Boolean

參數

comparand
Object

要與目前執行個體比較的 IPAddress 執行個體。An IPAddress instance to compare to the current instance.

傳回

如果兩個位址相等,則為 true,否則為 falsetrue if the two addresses are equal; otherwise, false.

備註

Equals 方法會比較目前的 IPAddress 實例與 comparand 參數,如果兩個實例包含相同的 IP 位址,則會傳回 trueThe Equals method compares the current IPAddress instance with the comparand parameter and returns true if the two instances contain the same IP address.

適用於