To Examples
Square Example, source code file Program.cs
using System; namespace Square { public class Program { /// <summary> /// Define and invoke a Square function, which inputs /// an int and returns the square of an int. /// </summary> /// <remark> /// The Square function is inspired by the Pascal /// function sqr. /// </remark> 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; } } }