Edit

Kongsi melalui


PeerContact.Equals Method

Definition

Determines whether the PeerName of this PeerContact object is equivalent to the name of another object.

Overloads

Equals(PeerContact)

Compares the PeerContact to the specified PeerContact instance.

Equals(Object)

Compares the PeerContact instance to the specified object.

Equals(Object, Object)

Determines whether the specified PeerContact instances are considered equal.

Remarks

Returns true if the specified Object has the same PeerName as the current instance, otherwise false. This method also returns false if passed parameters are null.

Equals(PeerContact)

Compares the PeerContact to the specified PeerContact instance.

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

Parameters

other
PeerContact

The PeerContact instance to test for equality.

Returns

true if the PeerContact instance provided has matching data; otherwise, false.

Implements

Exceptions

The PeerContact object has been disposed.

Remarks

Normalization does not occur on the strings prior to comparison. All normalization should have been completed while or before constructing the PeerContact objects.

Applies to

Equals(Object)

Compares the PeerContact instance to the specified object.

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

Parameters

obj
Object

Compares the PeerContact instance to the specified object.

Returns

true if the PeerContact instance provided has matching data; otherwise, false. This method also returns false if the passed parameter is null.

Exceptions

The PeerContact object has been disposed.

Remarks

Other objects that may be compared with PeerContact objects include peer host names, relative peer names, and names de-encapsulated from other System.Net.PeerToPeer objects.

Normalization does not occur on the strings prior to comparison. All normalization should have been completed while or before constructing the PeerContact objects.

Applies to

Equals(Object, Object)

Determines whether the specified PeerContact instances are considered equal.

public:
 static bool Equals(System::Object ^ objA, System::Object ^ objB);
public static bool Equals (object objA, object objB);
static member Equals : obj * obj -> bool
Public Shared Function Equals (objA As Object, objB As Object) As Boolean

Parameters

objA
Object

The first PeerContact to compare.

objB
Object

The second PeerContact to compare.

Returns

true if the PeerContact instances provided have matching data; otherwise, false.

Remarks

This can be used to determine whether a PeerName is in use simultaneously by two different remote peers.

Other objects that may be compared with PeerContact objects include peer host names, relative peer names, and names de-encapsulated from other System.Net.PeerToPeer objects.

See also

Applies to