Peer.Equals(Peer) Peer.Equals(Peer) Peer.Equals(Peer) Peer.Equals(Peer) Method

定義

在目前 Peer 和指定的對等電腦之間執行區分大小寫的比較。Performs a case-sensitive comparison of the current Peer and the specified peer.

public:
 virtual bool Equals(System::Net::PeerToPeer::Collaboration::Peer ^ other);
public bool Equals (System.Net.PeerToPeer.Collaboration.Peer other);
override this.Equals : System.Net.PeerToPeer.Collaboration.Peer -> bool
Public Function Equals (other As Peer) As Boolean

參數

other
Peer Peer Peer Peer

要與這個執行個體相比較的 Peer 執行個體。A Peer instance to compare to this instance.

傳回

若提供的 Peer 執行個體有與這個對等執行個體相同的 PeerEndPoints,即為 true;否則為 falsetrue if the supplied Peer instance has the same PeerEndPoints as this peer instance, otherwise, false. 如果對等參數為 false,則這個方法也會傳回 nullThis method also returns false if the peer parameter is null.

實作

備註

如果兩個對等都有相同的端點集合, 則會視為相等, 不論其PeerName屬性中的值為何。Two peers are considered equal if they have the same endpoint collection, regardless of the values in their PeerName properties. 使用案例不會直接牽涉到這個類別, 而是衍生PeerNearMe PeerContact或類別。Usage scenarios do not involve this class directly, but rather the derived PeerNearMe or the PeerContact classes.

適用於

另請參閱