CompareInfo Class
Implements a set of methods for culture-sensitive string comparisons.
For a list of all members of this type, see CompareInfo Members.
System.Object
System.Globalization.CompareInfo
[Visual Basic] <Serializable> Public Class CompareInfo Implements IDeserializationCallback [C#] [Serializable] public class CompareInfo : IDeserializationCallback [C++] [Serializable] public __gc class CompareInfo : public IDeserializationCallback [JScript] public Serializable class CompareInfo implements IDeserializationCallback
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
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.
If a security decision depends on a string comparison or a case-change operation, use the InvariantCulture to ensure that the behavior will be consistent regardless of the culture settings of the system.
Requirements
Namespace: System.Globalization
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: Mscorlib (in Mscorlib.dll)