Bewerken

Share via


CompareInfo.Version Property

Definition

Gets information about the version of Unicode used for comparing and sorting strings.

public:
 property System::Globalization::SortVersion ^ Version { System::Globalization::SortVersion ^ get(); };
public System.Globalization.SortVersion Version { get; }
member this.Version : System.Globalization.SortVersion
Public ReadOnly Property Version As SortVersion

Property Value

An object that contains information about the Unicode version used for comparing and sorting strings.

Remarks

The weight of individual characters, and therefore the way in which particular strings are compared or ordered, depends on the version of the Unicode specification that a particular version of the .NET Framework implements. In the .NET Framework 4.5, this also depends on the host operating system, as the following table shows. Note that this list of supported Unicode versions applies to character comparison and sorting only; it does not apply to classification of Unicode characters by category.

.NET Framework version Operating system Unicode version
.NET Framework 4 All operating systems Unicode 5.0
.NET Framework 4.5 and later versions Windows 7 Unicode 5.0
.NET Framework 4.5 and later versions Windows 8 and later Windows operating system versions Unicode 6.3

The SortVersion object returned by the Version property doesn't identify the precise Unicode version used to compare strings. It is useful only when comparing two SortVersion objects to determine whether they use the same Unicode version and culture to compare strings. For more information and an example, see the SortVersion reference page.

Applies to

See also