asp.net.ph

DataTable.Locale Property

System.Data Namespace   DataTable Class


Sets or retrieves the locale information used to compare strings within the table.

Syntax


Script DataTable.Locale [ = enumValue ]

Property Value


enumValue A CultureInfo that contains data about the user's machine locale. The default is the DataSet object's CultureInfo ( returned by the Locale property ) to which the DataTable belongs.

The property is read/write with no default value. If the table does not belong to a DataSet, the default is the current system CultureInfo.

Remarks

A CultureInfo represents the software preferences of a particular culture or community.When used for string comparisons, the CultureInfo affects sorting, comparisons, and filterings.

Example

The following example sets the CultureInfo using the Locale property and prints the ISO language name.

Private void LocaleDemo ( DataTable myTable ) {
   // print the LCID  of the present CultureInfo.
   Response.Write ( myTable.Locale.LCID );
   // create a new CultureInfo for the United Kingdom.
   CultureInfo myCultureInfo = new CultureInfo ( "en-gb" );
   myTable.Locale = myCultureInfo;
   // print the new LCID.
   Response.Write ( myTable.Locale.LCID );
}
  C# VB

See Also

DataTable Members   CultureInfo Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph