Get Variable Underlying System Type : System Data Type « Windows System « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Windows System » System Data TypeScreenshots 
Get Variable Underlying System Type
Get Variable Underlying System Type

Imports System.Reflection


Public Class MainClass

   Public Shared Sub Main()
        Dim As Integer
        Dim As Double
        Dim As String = "Hello, world"
        Dim As DateTime = New DateTime(Now.Ticks)
        Dim As Byte
        Dim 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
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.