CompareTo Method
Compares this SiteTermElement with a specified object.
Namespace: Microsoft.CommerceServer.Runtime.Profiles
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Overridable Function CompareTo ( _
obj As Object _
) As Integer
'Usage
Dim instance As SiteTermElement
Dim obj As Object
Dim returnValue As Integer
returnValue = instance.CompareTo(obj)
public virtual int CompareTo(
Object obj
)
public:
virtual int CompareTo(
Object^ obj
)
public function CompareTo(
obj : Object
) : int
Parameters
- obj
Type: System..::.Object
The object to compare with the current SiteTermElement.
Return Value
Type: System..::.Int32
A value indicating the lexical relationship between the SiteTermElement and obj.
Implements
IComparable..::.CompareTo(Object)
Remarks
Use this method to compares the SiteTermElement name to the specified SiteTermElement name. This method performs a word (case-sensitive and culture-sensitive) comparison using the current culture and returns a 32-bit signed integer indicating the lexical relationship between the two comparands.
If the return value is less than 0, the name member of the SiteTermElement object is less than the name member of the input parameter.
If the return value is equal to 0, the name member of the SiteTermElement object is equal to the name member of the input parameter.
If the return value is greater than 0, the name member of the SiteTermElement object is greater than the name member of the input parameter.
The CompareTo method performs a lexical comparison between string instances.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.