Pass Integer by value to a function : Pass by Value « Class Module « VB.Net Tutorial






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








6.5.Pass by Value
6.5.1.Pass Integer by value to a function
6.5.2.Pass Single by value and by reference to a function
6.5.3.Difference between reference types and value types.