本文整理匯總了VB.NET中System.Globalization.GregorianCalendar.MinSupportedDateTime屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET GregorianCalendar.MinSupportedDateTime屬性的具體用法?VB.NET GregorianCalendar.MinSupportedDateTime怎麽用?VB.NET GregorianCalendar.MinSupportedDateTime使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Globalization.GregorianCalendar
的用法示例。
在下文中一共展示了GregorianCalendar.MinSupportedDateTime屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Main
' 導入命名空間
Imports System.Globalization
Public Class SamplesCalendar
Public Shared Sub Main()
' Create an instance of the calendar.
Dim myCal As New GregorianCalendar()
Console.WriteLine(myCal.ToString())
' Display the MinSupportedDateTime.
Dim myMin As DateTime = myCal.MinSupportedDateTime
Console.WriteLine("MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin))
' Display the MaxSupportedDateTime.
Dim myMax As DateTime = myCal.MaxSupportedDateTime
Console.WriteLine("MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax))
End Sub
End Class
輸出:
System.Globalization.GregorianCalendar MinSupportedDateTime: 01/01/0001 MaxSupportedDateTime: 12/31/9999