Ok, so can someone explain to me why F# allows you to overload the > and ^ operators, but doesn't allow you to use them?
+ (op_Addition): Works just fine.
^ (op_Concatenate): Compiler error in F#. Apparently only strings can be concatenated.
> (op_GreaterThan): Runtime Error – Failure during generic comparison: the type Program+OppTest4 does not implement the System.IComparable interface.
If I compile my F# code as a library and use those operators from VB, they all work. If I use those operators from C#, all but op_Concatenate work (as expected). But F# not only ignores some them, the static type checker doesn't even bother telling you that it plans on doing so.
Edit Code Sample
type OppTest4(value: int) =
member this.value = value
static member (^) (left : OppTest4, right : OppTest4) =
OppTest4( Int32.Parse( left.value.ToString() ^ right.value.ToString() ))
static member (+) (left : OppTest4, right : OppTest4) =
OppTest4(left.value + right.value )
static member (>) (left : OppTest4, right : OppTest4) =
left.value > right.value
static member (<) (left : OppTest4, right : OppTest4) =
left.value < right.value