Simple solution to achive this.
private void button1_Click(object sender, EventArgs e)
{
String test = TestFunction("Mahesh Bagul.");
Console.WriteLine(test);
int val = TestFunction(10);
Console.WriteLine(val);
}
private T TestFunction<T>(T val)
{
return val;
//For a while I just return same value.
}