I am writing an F# interop class to be used from C#. I thought that F# had an implicit conversion from .NET Tuple<> type (similar to IEnumerable treated as seq), so I wrote the following code:
type MyClass() =
member this.MyMethod (t: Tuple<int, int>) =
let meaningOfLife (t : int * int) = 42
meaningOfLife t
This code fails to compile with the following error: error FS0001: This expression was expected to have type int * int but here has type Tuple
Then how to convert tuples between C# and F# (and back)?
meaningOfLife (t.item1, t.item2). - josejuan