SecureDeviceAddress.Compare Method

Compares a SecureDeviceAddress object to the current object, to see if they represent the same device.

Syntax

public:
int32 Compare(
         SecureDeviceAddress^ secureDeviceAddress
)  

Parameters

secureDeviceAddress
Type: SecureDeviceAddress 

The SecureDeviceAddress to be compared to this.

Return value

Type: int32 

 Returns 0 if the buffer objects represent the same device, or a non-zero value if they represent different devices.

Remarks

This method compares the invoking object (this) with the given SecureDeviceAddress object, and returns 0 in result if they refer to the same device. If they do not refer to the same device, then -1 is returned if the value of this is less than the passed-in object’s value, or 1 if the value of this is greater than that of the passed-in object. The relative value used to determine greater-than or less-than enables consistently sorting one device before another.

No connection to either of the SecureDeviceAddresses involved is required, and this method does not initiate communication with them.

Due to the time needed for the underlying data comparison this method can take longer than other data comparisons. Titles should avoid calling this method in time-critical loops and/or multiple times in a row. The expected call duration is up to 0.4ms.

Requirements

Namespace: Windows.Xbox.Networking

Metadata: windows.winmd

See also

Reference

SecureDeviceAddress Class

SecureDeviceAddress Members

Windows.Xbox.Networking Namespace