本文整理匯總了VB.NET中System.TimeSpan.TotalDays屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET TimeSpan.TotalDays屬性的具體用法?VB.NET TimeSpan.TotalDays怎麽用?VB.NET TimeSpan.TotalDays使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.TimeSpan
的用法示例。
在下文中一共展示了TimeSpan.TotalDays屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Example
Module Example
Public Sub Main()
' Define an interval of 3 days, 16+ hours.
Dim interval As New TimeSpan(3, 16, 42, 45, 750)
Console.WriteLine("Value of TimeSpan: {0}", interval)
Console.WriteLine("{0:N5} days, as follows:", interval.TotalDays)
Console.WriteLine(" Days: {0,3}", interval.Days)
Console.WriteLine(" Hours: {0,3}", interval.Hours)
Console.WriteLine(" Minutes: {0,3}", interval.Minutes)
Console.WriteLine(" Seconds: {0,3}", interval.Seconds)
Console.WriteLine(" Milliseconds: {0,3}", interval.Milliseconds)
End Sub
End Module
輸出:
Value of TimeSpan: 3.16:42:45.7500000 3.69636 days, as follows: Days: 3 Hours: 16 Minutes: 42 Seconds: 45 Milliseconds: 750