Skip to content

M_CodeJam_Strings_NaturalOrderStringComparer_Compare

andrewvk edited this page Jul 1, 2016 · 5 revisions

NaturalOrderStringComparer.Compare Method (String, String)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Namespace: CodeJam.Strings
Assembly: CodeJam (in CodeJam.dll) Version: 1.1.0.0 (1.1.0.0)

Syntax

C#

public static int Compare(
	string a,
	string b
)

VB

Public Shared Function Compare ( 
	a As String,
	b As String
) As Integer

F#

static member Compare : 
        a : string * 
        b : string -> int 

Parameters

 

a
Type: System.String
The first object to compare.
b
Type: System.String
The second object to compare.

Return Value

Type: Int32
A signed integer that indicates the relative values of a and b, as shown in the following table. Value Meaning Less than zero a is less than b. Zero a equals b. Greater than zero a is greater than b.

See Also

Reference

NaturalOrderStringComparer Class
Compare Overload
CodeJam.Strings Namespace

Clone this wiki locally