Create a class with a method that will return an integer
This method is used to accept two integer inputs, and in turn, it will return the sum of those integers.
using System; class Ex5/* w w w . j a v a 2 s . com*/ { public int Sum(int x, int y) { return x + y; } } class Program { static void Main(string[] args) { //A Simple class with a method returning an integer Ex5 ob = new Ex5(); int result = ob.Sum(57, 63); Console.WriteLine("Sum of 57 and 63 is : " + result); Console.ReadKey(); } }