StringSegmentCompareTo(Object) Method

Compares this instance to the specified object using ordinal comparison, and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified StringSegment.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public int CompareTo(
	Object? obj
)

Parameters

obj  Object
A StringSegment or string object to compare with this instance.

Return Value

Int32
A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the obj parameter.

Implements

IComparableCompareTo(Object)

Remarks

  Note

Unlike the String.CompareTo method, this one performs an ordinal comparison. Use the Compare methods to perform a custom comparison.

See Also