public delegate void D();
class Student
{
public void Total()
{
Console.Write("Enter the first number :");
int FirstNumber = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter the second number :");
int SecondNumber = Convert.ToInt32(Console.ReadLine());
int Result = FirstNumber+SecondNumber;
Console.Write("Total :"+Result);
}
}
class Program
{
static void Main(string[]args)
{
Student stu = new Student();
D d = new D(stu.Total);
d.Invoke();
Console.ReadKey();
}
}