I am writing an F # interaction class to be used with C #. I thought that F # had an implicit conversion from the .NET Tuple <> type (similar to IEnumerable processed 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 cannot compile with the following error: error FS0001: it is expected that this expression will be of type int * int, but there is a type of Tuple
Then how to convert tuples between C # and F # (and vice versa)?
source share