F# comparison vs C# IComparable
问题 My problem, in a nutshell, is this: What can I do about storing a tuple (or any type with a constraint of 'comparison') in a C# container that requires an IComparable ? This works: > let x (y : 'a when 'a : comparison) = y ;; val x : y:'a -> 'a when 'a : comparison > x (1,2) ;; val it : int * int = (1, 2) I would have thought this would work: > let x (y : IComparable<int>) = y ;; val x : y:IComparable<int> -> IComparable<int> > x (1,2) ;; x (1,2) ;; ---^^^ stdin(28,4): error FS0001: The type