StringComparer.IsWellKnownOrdinalComparer 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.
Determines whether the specified IEqualityComparer<T> is a well-known ordinal string comparer.
public:
static bool IsWellKnownOrdinalComparer(System::Collections::Generic::IEqualityComparer<System::String ^> ^ comparer, [Runtime::InteropServices::Out] bool % ignoreCase);
public static bool IsWellKnownOrdinalComparer (System.Collections.Generic.IEqualityComparer<string?>? comparer, out bool ignoreCase);
static member IsWellKnownOrdinalComparer : System.Collections.Generic.IEqualityComparer<string> * bool -> bool
Public Shared Function IsWellKnownOrdinalComparer (comparer As IEqualityComparer(Of String), ByRef ignoreCase As Boolean) As Boolean
Parameters
- comparer
- IEqualityComparer<String>
The comparer to query.
- ignoreCase
- Boolean
When this method returns, contains a value stating whether comparer
is case-insensitive. Set to false
if this method returns false
.
Returns
true
if comparer
is a well-known ordinal string comparer; otherwise, false
.
Remarks
A "well-known ordinal comparer" describes a comparer that behaves identically to Ordinal
when passed to Dictionary<TKey,TValue> or HashSet<T>.
For example, Default is a well-known ordinal comparer because
a Dictionary<TKey,TValue> given Default as a constructor
argument will behave identically to a Dictionary<TKey,TValue> given Ordinal
as a constructor argument. If ignoreCase
is true
on method exit,
then comparer
behaves identically to OrdinalIgnoreCase when passed to the
constructor of such a collection.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기