Type.UnderlyingSystemType : Type « System « VB.Net by API






Type.UnderlyingSystemType

  

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 

   
    
  








Related examples in the same category

1.Type.FindMembers
2.Type.GetHashCode()
3.Type.GetInterfaces()
4.Type.GetMembers()
5.Type.GetMethod
6.Type.GetType()