VB.Net by API/System/TimeSpan

Материал из VB Эксперт
Перейти к: навигация, поиск

New TimeSpan

  
Imports System
Public Class MainClass
    Shared Sub Main(ByVal args As String())
        Dim ts1, ts2 As TimeSpan
        ts1 = New TimeSpan(1, 2, 3)
        ts2 = New TimeSpan(ts1.Ticks * 12)
        Console.WriteLine(ts1.ToString)
        Console.WriteLine(ts2.ToString)
          
    End Sub
End Class


TimeSpan.Ticks

  
public class Test
   public Shared Sub Main
        Dim ts1, ts2 As TimeSpan
        ts1 = New TimeSpan(1, 2, 3)
        ts2 = New TimeSpan(ts1.Ticks * 12)
        Console.WriteLine(ts1.ToString)
        Console.WriteLine(ts2.ToString)
   End Sub
End class