LogiQuest
Back to Generics
9

What is the output of the following program?

Console.WriteLine(Max(3, 8) + " " + Max("apple", "pear"));
static T Max<T>(T a, T b) where T : IComparable<T> => a.CompareTo(b) > 0 ? a : b;
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.