To Examples
Square Example, source code file Program.cs
using System; namespace Square { public class Program { ///
/// Define and invoke a Square function, which inputs /// an int and returns the square of an int. ///
///
/// The Square function is inspired by the Pascal /// function sqr. ///
public static void Main() { int x = 5; int y = square(x); Console.WriteLine(y); Console.ReadLine(); } public static int square(int a) { int b; b = a * a; return b; } } }