本文整理匯總了VB.NET中System.TimeZoneInfo.HasSameRules方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET TimeZoneInfo.HasSameRules方法的具體用法?VB.NET TimeZoneInfo.HasSameRules怎麽用?VB.NET TimeZoneInfo.HasSameRules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了TimeZoneInfo.HasSameRules方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: timeZoneArray
Dim timeZones As ReadOnlyCollection(Of TimeZoneInfo) = TimeZoneInfo.GetSystemTimeZones()
Dim timeZoneArray(timeZones.Count - 1) As TimeZoneInfo
timeZones.CopyTo(timeZoneArray, 0)
'Dim arrayPtr As Integer = 1
' Iterate array from top to bottom
For ctr As Integer = timeZoneArray.GetUpperBound(0) To 1 Step -1
' Get next item from top
Dim thisTimeZone As TimeZoneInfo = timeZoneArray(ctr)
For compareCtr As Integer = 0 To ctr - 1
' Determine if time zones have the same rules
If thisTimeZone.HasSameRules(timeZoneArray(compareCtr)) Then
Console.WriteLine("{0} has the same rules as {1}", _
thisTimeZone.StandardName, _
timeZoneArray(compareCtr).StandardName)
End If
Next
Next