using System;
class Program
{
static int Square(int i)
{
int sqr = i * i;
return sqr;
}
static void Main()
{
int i = 5;
Console.WriteLine(Square(i));
Console.ReadKey();
}
}
|
Class Program
Private Shared Function Square(i As Integer) As Integer
Dim sqr As Integer = i * i
Return sqr
End Function
Private Shared Sub Main()
Dim i As Integer = 5
Console.WriteLine(Square(i))
Console.ReadKey()
End Sub
End Class
|