⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localdeclarationa.vb

📁 大名鼎鼎的mono是.NET平台的跨平台(支持linux
💻 VB
字号:
Imports SystemModule LocalDeclarationA    Function Main() As Integer        Dim i, sum As Integer        For i = 0 To 4            sum = sum + f2()        Next        If sum <> 15 Then            System.Console.WriteLine("#LD1: Static locals error") : Return 1        End If    End Function    Function f1() As Object        ' Various kinds of local decalations statements        Const a1 As Integer = 2        Static a2 As Double        Dim a3 As Integer ' Default value is initialized to 0         Dim a4 As Boolean = True        Dim arr1() As Integer = {0, 1, 2, 3}        Dim arr2(,) As Integer = {{1, 2, 3}, {1 + 1, 1 + 2, 1 + 3}}        Dim arr3(10) As Integer ' An array of 11 integers indexed from 0 through 10        Dim arr4(2, 3, 4) As Date        Dim arr5() As Object        Dim b1, b2, b3, b4 As Integer        Dim c1 As Double, c2 As Boolean, c3 As DateTime        Dim d1 As New Date(2004, 8, 11)    End Function    Function f2() As Integer        Static a As Integer        a = a + 1        Return a    End FunctionEnd Module

⌨️ 快捷键说明

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