本文整理匯總了VB.NET中System.Type.UnderlyingSystemType屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET Type.UnderlyingSystemType屬性的具體用法?VB.NET Type.UnderlyingSystemType怎麽用?VB.NET Type.UnderlyingSystemType使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類System.Type
的用法示例。
在下文中一共展示了Type.UnderlyingSystemType屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: MainClass
' 導入命名空間
Imports System.Reflection
Public Class MainClass
Public Shared Sub Main()
Dim A As Integer
Dim B As Double
Dim C As String = "Hello, world"
Dim D As DateTime = New DateTime(Now.Ticks)
Dim E As Byte
Dim F As Boolean
Console.WriteLine("Type Codes:")
Console.WriteLine("Integer: " & A.GetTypeCode() & _
" " & A.GetType().Name & " " & A.GetType().UnderlyingSystemType.ToString())
Console.WriteLine("Double: " & B.GetTypeCode() & _
" " & B.GetType().Name & " " & B.GetType().UnderlyingSystemType.ToString())
Console.WriteLine("String: " & C.GetTypeCode() & _
" " & C.GetType().Name & " " & C.GetType().UnderlyingSystemType.ToString())
Console.WriteLine("DateTime: " & D.GetTypeCode() & _
" " & D.GetType().Name & " " & D.GetType().UnderlyingSystemType.ToString())
Console.WriteLine("Byte: " & E.GetTypeCode() & _
" " & E.GetType().Name & " " & E.GetType().UnderlyingSystemType.ToString())
Console.WriteLine("Boolean: " & F.GetTypeCode() & _
" " & F.GetType().Name & " " & F.GetType().UnderlyingSystemType.ToString())
End Sub
End Class