'宣言 Public Function FindByStandardName( _ ByVal standardName As String _ ) As Infragistics.Win.TimeZoneInfo
public Infragistics.Win.TimeZoneInfo FindByStandardName( string standardName )
Imports Infragistics.Win Imports Infragistics.Win.UltraWinEditors Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Dim tzi As TimeZoneInfo = Me.UltraTimeZoneEditor1.FindByStandardName("pacific standard time") If Not tzi Is Nothing Then Debug.WriteLine("The current time in the '" + tzi.StandardName + "' time zone is: " + tzi.Now.ToShortTimeString()) End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinEditors; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { TimeZoneInfo tzi = this.ultraTimeZoneEditor1.FindByStandardName( "pacific standard time" ); if ( tzi != null ) Debug.WriteLine( "The current time in the '" + tzi.StandardName + "' time zone is: " + tzi.Now.ToShortTimeString() ); }