Export (0) Print
Expand All

RegionInfo.IsMetric Property

Gets a value indicating whether the country/region uses the metric system for measurements.

Namespace:  System.Globalization
Assemblies:   System.Globalization (in System.Globalization.dll)
  mscorlib (in mscorlib.dll)

'Declaration
Public Overridable ReadOnly Property IsMetric As Boolean

Property Value

Type: System.Boolean
true if the country/region uses the metric system for measurements; otherwise, false.

The following code example displays the properties of the RegionInfo class.

Imports System
Imports System.Globalization


Public Class SamplesRegionInfo   

   Public Shared Sub Main()

      ' Displays the property values of the RegionInfo for "US". 
      Dim myRI1 As New RegionInfo("US")
      Console.WriteLine("   Name:                         {0}", myRI1.Name)
      Console.WriteLine("   DisplayName:                  {0}", myRI1.DisplayName)
      Console.WriteLine("   EnglishName:                  {0}", myRI1.EnglishName)
      Console.WriteLine("   IsMetric:                     {0}", myRI1.IsMetric)
      Console.WriteLine("   ThreeLetterISORegionName:     {0}", myRI1.ThreeLetterISORegionName)
      Console.WriteLine("   ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName)
      Console.WriteLine("   TwoLetterISORegionName:       {0}", myRI1.TwoLetterISORegionName)
      Console.WriteLine("   CurrencySymbol:               {0}", myRI1.CurrencySymbol)
      Console.WriteLine("   ISOCurrencySymbol:            {0}", myRI1.ISOCurrencySymbol)

   End Sub 'Main 

End Class 'SamplesRegionInfo


'This code produces the following output. 



'   Name:                         US 

'   DisplayName:                  United States 

'   EnglishName:                  United States 

'   IsMetric:                     False 

'   ThreeLetterISORegionName:     USA 

'   ThreeLetterWindowsRegionName: USA 

'   TwoLetterISORegionName:       US 

'   CurrencySymbol:               $ 

'   ISOCurrencySymbol:            USD

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft