System.Globalization Namespace
Implements a set of methods for culture-sensitive string comparisons.
Visibility |
Name |
Parameters |
Return Type |
public |
Compare |
(
String
string1
,
Int32
offset1
,
String
string2
,
Int32
offset2
,
CompareOptions
options
)
|
Int32
|
public |
Compare |
(
String
string1
,
Int32
offset1
,
Int32
length1
,
String
string2
,
Int32
offset2
,
Int32
length2
)
|
Int32
|
public |
Compare |
(
String
string1
,
String
string2
)
|
Int32
|
public |
Compare |
(
String
string1
,
String
string2
,
CompareOptions
options
)
|
Int32
|
public |
Compare |
(
String
string1
,
Int32
offset1
,
String
string2
,
Int32
offset2
)
|
Int32
|
public |
Compare |
(
String
string1
,
Int32
offset1
,
Int32
length1
,
String
string2
,
Int32
offset2
,
Int32
length2
,
CompareOptions
options
)
|
Int32
|
public |
Equals |
(
Object
value
)
|
Boolean
|
public static |
GetCompareInfo |
(
Int32
culture
,
Assembly
assembly
)
|
CompareInfo
|
public static |
GetCompareInfo |
(
Int32
culture
)
|
CompareInfo
|
public static |
GetCompareInfo |
(
String
name
,
Assembly
assembly
)
|
CompareInfo
|
public static |
GetCompareInfo |
(
String
name
)
|
CompareInfo
|
public |
GetHashCode |
(
String
source
,
CompareOptions
options
)
|
Int32
|
public |
GetHashCode |
( )
|
Int32
|
public |
GetSortKey |
(
String
source
,
CompareOptions
options
)
|
SortKey
|
public |
GetSortKey |
(
String
source
)
|
SortKey
|
public |
IndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
Int32
count
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
CompareOptions
options
)
|
Int32
|
public |
IndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
CompareOptions
options
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
Int32
count
,
CompareOptions
options
)
|
Int32
|
public |
IndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
Int32
count
,
CompareOptions
options
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
Int32
count
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
,
Int32
startIndex
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
)
|
Int32
|
public |
IndexOf |
(
String
source
,
Char
value
)
|
Int32
|
public |
IndexOf |
(
String
source
,
Char
value
,
CompareOptions
options
)
|
Int32
|
public |
IndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
)
|
Int32
|
public |
IndexOf |
(
String
source
,
String
value
,
CompareOptions
options
)
|
Int32
|
public |
IsPrefix |
(
String
source
,
String
prefix
,
CompareOptions
options
)
|
Boolean
|
public |
IsPrefix |
(
String
source
,
String
prefix
)
|
Boolean
|
public static |
IsSortable |
(
String
text
)
|
Boolean
|
public static |
IsSortable |
(
Char
ch
)
|
Boolean
|
public |
IsSuffix |
(
String
source
,
String
suffix
,
CompareOptions
options
)
|
Boolean
|
public |
IsSuffix |
(
String
source
,
String
suffix
)
|
Boolean
|
public |
LastIndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
Int32
count
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
Int32
count
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
Int32
count
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
Int32
count
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
String
value
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
String
value
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
String
value
,
Int32
startIndex
,
CompareOptions
options
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
Char
value
,
Int32
startIndex
)
|
Int32
|
public |
LastIndexOf |
(
String
source
,
String
value
,
Int32
startIndex
)
|
Int32
|
public |
ToString |
( )
|
String
|
|
The CultureInfo class includes a CompareInfo property that is an instance of this class. String.Compare uses the information in CultureInfo.CompareInfo to compare strings.
Unlike most classes, CompareInfo provides the GetCompareInfo method, instead of public constructors, to allow for late-bound access.
To create a CompareInfo for any culture, use the CultureInfo.CompareInfo property, or use the GetCompareInfo method.
CompareOptions Enum
|
|