System.Threading.Thread.CurrentCulture Property

Gets or sets the culture for the current thread.

Syntax

public System.Globalization.CultureInfo CurrentCulture { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The System.Globalization.CultureInfo object that is returned by this property, together with its associated objects, determine the default format for dates, times, numbers, currency values, the sorting order of text, casing conventions, and string comparisons. See the System.Globalization.CultureInfo class to learn about culture names and identifiers, the differences between invariant, neutral, and specific cultures, and the way culture information affects threads and application domains. See the System.Globalization.CultureInfo.CurrentCulture property to learn how a thread's default culture is determined, and how users set culture information for their computers.

Beginning with the net_v40_long, you can set the Thread.CurrentCulture property to a neutral culture. This is because the behavior of the System.Globalization.CultureInfo class has changed: When it represents a neutral culture, its property values (in particular, the System.Globalization.CultureInfo.Calendar, System.Globalization.CultureInfo.CompareInfo, System.Globalization.CultureInfo.DateTimeFormat, System.Globalization.CultureInfo.NumberFormat, and System.Globalization.CultureInfo.TextInfo properties) now reflect the specific culture that is associated with the neutral culture. In earlier versions of the .NET Framework, the Thread.CurrentCulture property threw a NotSupportedException exception when a neutral culture was assigned.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0