Consider this:
class GameEngine { }
class UnrealEngine : GameEngine { }
class UnityEngine : GameEngine { }
static void Main(string[] args) {
GameEngine engine1 = new UnrealEngine();
GameEngine engine2 = new UnityEngine();
if (engine1 > engine2)
System.Console.WriteLine(
"{0} is better than {1}",
engine1.GetType().Name,
engine2.GetType().Name);
}
Compilation error: "Error 1 Operator '>' cannot be applied to operands of type 'GameEngine' and 'GameEngine'". Comparison operator not defined.
Go define it. :-)
Why? Read the following to understand the background:
http://en.wikipedia.org/wiki/Partially_ordered_set[
^]. :-)
—SA