Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.49 KB | None | 0 0
  1.  
  2.     Sub AddOne(ByRef viMyValue As Integer)
  3.         viMyValue += 1
  4.     End Sub
  5.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  6.         Dim liValue As Integer = 1, liExpected As Integer = 1
  7.         MsgBox(liValue & "=" & liExpected)
  8.         liExpected += 1
  9.         AddOne(liValue)
  10.         MsgBox(liValue & "=" & liExpected)
  11.         liExpected += 1
  12.         AddOne((liValue))
  13.         MsgBox(liValue & "=" & liExpected)
  14.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement