using System;
using System.Collections.Generic;
interface GenericInterface
{
T getValue(T tValue);
}
class MyClass : GenericInterface
{
public T getValue(T tValue)
{
return tValue;
}
}
class MainClass
{
static void Main()
{
MyClass intObject = new MyClass();
MyClass stringObject = new MyClass();
Console.WriteLine("{0}", intObject.getValue(5));
Console.WriteLine("{0}", stringObject.getValue("Hi there."));
}
}
5
Hi there.