using System.Collections.Generic;
using System.Threading.Tasks;
namespace ConsoleApplication3
static void Main(string[] args)
GenericCalculator<string> g1 = new GenericCalculator<string>();
Console.WriteLine(g1.Add("Hello", "World"));
Console.WriteLine(g1.Multiply("Hello", "World"));
GenericCalculator<float> g2 = new GenericCalculator<float>();
Console.WriteLine(g2.Add(5.1f, 3.2f));
public class GenericCalculator<T>
public T Subtract(T n1, T n2)
public T Multiply(T n1, T n2)
public T Divide(T n1, T n2)