functionargu_byreferenceb.vb
来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 26 行
VB
26 行
'============================================================================================='Name:Manish Kumar Sinha 'Email Address: manishkumarsinha@sify.com'Test Case Name: Argument passing by Reference:'APR-1.4.0: If procedure is define by passing argument by reference and while calling the' procedure it is passes by giving parentheses around the variable then it protect' it from change '=============================================================================================Imports SystemModule APR_1_4_0 Function F(ByRef p As Integer) As Integer p += 1 Return p End Function Function Main() As Integer Dim a As Integer = 1 Dim b As Integer = 0 b = F((a)) If (b = a) Then Throw New System.Exception("#A1, Unexpected behavior in Arguments_ByReferenceB.vb") End If End FunctionEnd Module'=============================================================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?