constanta.vb

来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 34 行

VB
34
字号
Option Strict OffImports SystemModule ConstantA    Public Const a As Integer = 10    Const b As Boolean = True, c As Long = 20    Const d = 20    Const e% = 10    Const f% = 10, g# = 20    Function Main() As Integer        If a.GetTypeCode() <> TypeCode.Int32 Then            System.Console.WriteLine("#A1, Type mismatch found") : Return 1        End If        If b.GetTypeCode() <> TypeCode.Boolean Then            System.Console.WriteLine("#A2, Type mismatch found") : Return 1        End If        If c.GetTypeCode() <> TypeCode.Int64 Then            System.Console.WriteLine("#A3, Type mismatch found") : Return 1        End If        If d.GetTypeCode() <> TypeCode.Int32 Then            System.Console.WriteLine("#A4, Type mismatch found") : Return 1        End If        If e.GetTypeCode() <> TypeCode.Int32 Then            System.Console.WriteLine("#A5, Type mismatch found") : Return 1        End If        If f.GetTypeCode() <> TypeCode.Int32 Then            System.Console.WriteLine("#A6, Type mismatch found") : Return 1        End If        If g.GetTypeCode() <> TypeCode.Double Then            System.Console.WriteLine("#A7, Type mismatch found") : Return 1        End If    End FunctionEnd Module

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?