How to CultureInfo in C#
The CultureInfo class holds culture-specific information, such as the associated language, sublanguage, country/region, calendar, and cultural conventions. This class also provides access to culture-specific instances of DateTimeFormatInfo, NumberFormatInfo, CompareInfo, and TextInfo.
Culture information sample:
The cultures are generally grouped into three sets: the invariant culture, the neutral cultures, and the specific cultures. The cultures have a hierarchy, such that the parent of a specific culture is a neutral culture and the parent of a neutral culture is the InvariantCulture. The Parent property returns the neutral culture associated with a specific culture. If the resources for the specific culture are not available in the system, the resources for the neutral culture are used; if the resources for the neutral culture are not available, the resources embedded in the main assembly are used.
The culture is a property of the executing thread. This read-only property returns Thread.CurrentCulture. You can find the current culture information from.
The following C# program shows how to get all culture names in the .NET Framework. To use CultureInfo class you need to include System.Globalization namespace in your project.
Full Source C#- C# Types
- C# boxing and unboxing
- C# DataTypes
- C# type conversions
- C# Access Modifiers , CSharp Access Specifiers
- How do I solve System.InvalidCastException?
- Difference between readonly and const keyword
- DateTime Format In C#
- Difference Between Task and Thread
- Object reference not set to an instance of an object
- How to Convert Char to String in C#
- How to Convert Char Array to String in C#
- How to convert int to string in C#?