Imports System
Imports System.Globalization
Public Class SamplesRegionInfo
Public Shared Sub Main()
' Creates a RegionInfo using the ISO 3166 two-letter code.
Dim myRI1 As New RegionInfo("US")
' Creates a RegionInfo using a CultureInfo.LCID.
Dim myRI2 As New RegionInfo(New CultureInfo("en-US", False).LCID)
' Compares the two instances.
If myRI1.Equals(myRI2) Then
Console.WriteLine("The two RegionInfo instances are equal.")
Else
Console.WriteLine("The two RegionInfo instances are NOT equal.")
End If
End Sub
End Class
|