First part: call F# from F#
Let s say we have the following type defined in F#:
type MyClass =
static member Overload1 (x, y) = "Pim"
static member Overload1 (x : System.Tuple<_, _>) = "Pam"
static member Overload1 x = "Pum"
You are now in another module (in another file).
How can you call each of the three methods shown above?
Second part: call C# from F#
Now, you define a class in C#:
public class MyClass {
public static string Overload1<a, b>(a x, b y) { return "Pim"; }
public static string Overload1<a, b>(Tuple<a, b> x) { return "Pam"; }
public static string Overload1<a>(a x) { return "Pum"; }
}
From a F# code, how can you call each of the three methods now defined in C#?