The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataSet.Locale Property

Gets or sets the locale information used to compare strings within the table.

[Visual Basic]
Public Property Locale As CultureInfo
public CultureInfo Locale {get; set;}
public: __property CultureInfo* get_Locale();
public: __property void set_Locale(CultureInfo*);
public function get Locale() : CultureInfo;
public function set Locale(CultureInfo);

Property Value

A CultureInfo that contains data about the user's machine locale. The default is a null reference (Nothing in Visual Basic).


The Locale property specifies the locale for which sorting will apply.

By default, setting the Locale for a DataSet also sets the Locale for each DataTable object in that DataSet to the same value.


[Visual Basic] The following example gets the CultureInfo for a DataSet and prints the DisplayName and EnglishName properties.

[Visual Basic] 
Private Sub GetCultureInfo()
   Dim ci As System.Globalization.CultureInfo
   ci = DataSet1.Locale
   Console.WriteLine(ci.DisplayName, ci.EnglishName)
End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.


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

See Also

DataSet Class | DataSet Members | System.Data Namespace | CultureInfo

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft