RuntimeSupport.RepresentationCompare Method
When running under XRT, realizes a linear order on the representation of values which subsumes built-in equality.
When running under the CLR, does comparison of hash codes, which might not subsume built-in equality.
Namespace: Microsoft.Xrt.Runtime
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)
Usage
'Usage
Syntax
'Declaration
public static int RepresentationCompare<T> (
bool respectBoxIdentity,
T value1,
T value2
)
GenericParameters
- T
The base type under which the values should be interpreted.
Parameters
- respectBoxIdentity
Whether box identities should be respected.
- value1
The first value.
- value2
The second value.
Return Value
Returns Int32.
Remarks
This order is not used to replace equality, but to realize a normalized representation of collections of values, which behaves well for state identification under XRT. If not running under XRT, the normalization is not relevant, and therefore it is feasible in this case to provide a degenerated version of ordering.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003
See Also
Reference
RuntimeSupport Class
RuntimeSupport Members
Microsoft.Xrt.Runtime Namespace