Imports System
Imports System.Diagnostics
Public Class MainClass
Shared Sub DoubleItByVal(ByVal X As Single)
X *= 2
End Sub
Shared Sub DoubleItByRef(ByRef X As Single)
X *= 2
End Sub
Shared Sub Main()
Dim value As Single
value = 10
DoubleItByVal(value)
Console.WriteLine(value)
value = 10
DoubleItByRef(value)
Console.WriteLine(value)
End Sub
End Class
|