using System;
class Pass
{
public static void Value(ref int param)
{
param = 23;
}
}
class Program
{
static void Main(string[] args)
{
int i = 5;
Console.WriteLine(i);
Pass.Value(ref i);
Console.WriteLine(i);
Console.ReadLine();
}
}
|
Class Pass
Public Shared Sub Value(ByRef param As Integer)
param = 23
End Sub
End Class
Class Program
Private Shared Sub Main(args As String())
Dim i As Integer = 5
Console.WriteLine(i)
Pass.Value(i)
Console.WriteLine(i)
Console.ReadLine()
End Sub
End Class
|