namedargumentsb.vb

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

VB
25
字号
Option Strict Off'Author:'   V. Sudharsan (vsudharsan@novell.com)'' (C) 2005 Novell, Inc.Class C    Public Function fun(ByVal i As Integer, Optional ByVal a1 As Char = "c") As Integer        If a1 = "c" And i = 2 Then            Return 10        End If        Return 11    End FunctionEnd ClassModule M    Function Main() As Integer        Dim o As C = New C()        Dim a As Integer = o.fun(i:=2)        If a <> 10 Then            System.Console.WriteLine("#A1 - Binding not proper") : Return 1        End If    End FunctionEnd Module

⌨️ 快捷键说明

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