Data type: Long, Char, Hex and Oct : Oct « Data Types « 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 » Data Types » OctScreenshots 
Data type: Long, Char, Hex and Oct
Data type: Long, Char, Hex and Oct

Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())
        Dim num_desserts&
        Dim satisfaction_quotient#
        num_desserts = 100
        satisfaction_quotient# = 1.23

        Dim an_integer As Integer = 100
        Dim a_long As Long = 10000000000
        Dim a_double As Double = 1.0

        Dim a_boolean As Boolean = True
        Dim a_date As Date = #12/31/2007#

        Dim As Long = 123L
        Dim ch As Char = "X"c

        Dim flags As ULong
        flags = 100 ' Decimal 100.
        flags = &H64 ' Hexadecimal &H64 = 16 96 100.
        flags = &O144 ' Octal &O144 = 64 32 100.

        Console.WriteLine(flags)      ' Decimal.
        Console.WriteLine(Hex(flags)) ' Hexadecimal.
        Console.WriteLine(Oct(flags)) ' Octal.

    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.