variablesa.vb
来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 61 行
VB
61 行
Option Strict OffImports SystemClass A Public Shared y As Integer = 20 Public z As Integer = 30 Shared Sub New() End Sub Public Sub New() End Sub Shared Function f() As Integer Return 50 End FunctionEnd ClassModule M Function Main() As Integer If (A.y <> 20) Then Throw New Exception("#A1, Unexpected result") End If Dim c As Object = New A() Dim d As Object = New A() If (c.y <> 20) Then Throw New Exception("#A2, Unexpected result") End If If (d.y <> 20) Then Throw New Exception("#A3, Unexpected result") End If A.y = 25 If (c.y <> 25) Then Throw New Exception("#A4, Unexpected result") End If c.y = 35 If (A.y <> 35) Then Throw New Exception("#A5, Unexpected result") End If If (d.y <> 35) Then Throw New Exception("#A6, Unexpected result") End If If (c.z <> 30) Then Throw New Exception("#A7, Unexpected result") End If If (A.f() <> 50) Then Throw New Exception("#A8, Unexpected result") End If End FunctionEnd Module
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?