CaseInsensitiveComparer.Default Property

Definition

Gets an instance of CaseInsensitiveComparer that is associated with the CurrentCulture of the current thread and that is always available.

public:
 static property System::Collections::CaseInsensitiveComparer ^ Default { System::Collections::CaseInsensitiveComparer ^ get(); };
public static System.Collections.CaseInsensitiveComparer Default { get; }
member this.Default : System.Collections.CaseInsensitiveComparer
Public Shared ReadOnly Property Default As CaseInsensitiveComparer

Property Value

CaseInsensitiveComparer

An instance of CaseInsensitiveComparer that is associated with the CurrentCulture of the current thread.

Remarks

When the CaseInsensitiveComparer instance is created using the parameterless constructor, the Thread.CurrentCulture of the current thread is saved. Comparison procedures use the saved culture to determine the sort order and casing rules; therefore, string comparisons might have different results depending on the culture. For more information on culture-specific comparisons, see the System.Globalization namespace and Globalization and Localization.

Applies to

See also