public class Test
public Shared Sub Main
Dim value As Single
value = 10
DoubleItByVal(value)
Console.WriteLine(value)
value = 10
DoubleItByRef(value)
Console.WriteLine(value)
End Sub
Shared Sub DoubleItByVal(ByVal X As Single)
X *= 2
End Sub
Shared Sub DoubleItByRef(ByRef X As Single)
X *= 2
End Sub
End class
10
20