using System;
public class Program
{
//create a (user-defined) method
static void MyMethod() //method does not have a return value
//Code to be executed if the method called
//action to be performed
Console.WriteLine("I just got executed");
}
public static void MyChild(string fname = "Sakinah", int age = 45)
Console.WriteLine(fname + " Ali is " + age + " years old");
static int Sum(int x)
return 5 + x;
public static void Main(string[] args)
//call (execute) a method
MyMethod();
MyChild("Latifah", 19);
MyChild("Abu", 21);
MyChild();
MyChild("Najib", 36);
Console.WriteLine(Sum(3));