VB.Net Tutorial/Data Type/ULong

Материал из VB Эксперт
Перейти к: навигация, поиск

ULong of Decimal

<source lang="vbnet">public class Test

  public Shared Sub Main
       Dim flags As ULong
       flags = 100 " Decimal 100.
       Console.WriteLine(flags)      " Decimal.
  End Sub

End class</source>

100

ULong of Hex

<source lang="vbnet">public class Test

  public Shared Sub Main
       Dim flags As ULong
       flags = &H64 " Hexadecimal &H64 = 6 * 16 + 4 = 96 + 4 = 100.
       Console.WriteLine(Hex(flags)) " Hexadecimal.
  End Sub

End class</source>

64

ULong of Oct

<source lang="vbnet">public class Test

  public Shared Sub Main
       Dim flags As ULong
       flags = &O144 " Octal &O144 = 1 * 8 * 8 + 4 * 8 + 4 = 64 + 32 + 4 = 100.
       Console.WriteLine(Oct(flags)) " Octal.
  End Sub

End class</source>

144