GlobalizationExtensions.GetStringComparer(CompareInfo, CompareOptions) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a StringComparer object based on the culture-sensitive string comparison rules of a specified CompareInfo object.
public:
[System::Runtime::CompilerServices::Extension]
static StringComparer ^ GetStringComparer(System::Globalization::CompareInfo ^ compareInfo, System::Globalization::CompareOptions options);
public static StringComparer GetStringComparer (this System.Globalization.CompareInfo compareInfo, System.Globalization.CompareOptions options);
static member GetStringComparer : System.Globalization.CompareInfo * System.Globalization.CompareOptions -> StringComparer
<Extension()>
Public Function GetStringComparer (compareInfo As CompareInfo, options As CompareOptions) As StringComparer
Parameters
- compareInfo
- CompareInfo
An object that supports culture-sensitive string comparison.
- options
- CompareOptions
A value that defines how strings should be compared. options
is either the enumeration value Ordinal, the enumeration value OrdinalIgnoreCase, or a bitwise combination of one or more of the following values: IgnoreCase, IgnoreSymbols, IgnoreNonSpace, IgnoreWidth, IgnoreKanaType, and StringSort.
Returns
An object that can be used to perform string comparisons.
Exceptions
compareInfo
is null
.
options
is invalid.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om