public class Test
public Shared Sub Main
Dim myInteger As Integer = 5
TestByVal(myInteger)
Console.WriteLine(myInteger)
End Sub
Private Shared Sub TestByVal(ByVal int As Integer)
int = int * 2
End Sub
End class
5