C#
 static T Sum<T>(T x, T y)
        {
            dynamic dx = x, dy = y;
            return dx + dy;
        }

You can call Like : string t = Sum<string>("XYZ", "ABC");