Como usar o objeto C # do F #?
Eu tenho o seguinte código C #.
namespace MyMath {
public class Arith {
public Arith() {}
public int Add(int x, int y) {
return x + y;
}
}
}
E eu vim com o código F # chamado testcs.fs para usar esse objeto.
open MyMath.Arith
let x = Add(10,20)
Quando executo o seguinte comando
fsc -r:MyMath.dll testcs.fs
Eu recebi esta mensagem de erro.
/Users/smcho/Desktop/cs/namespace/testcs.fs(1,13): error FS0039: The namespace 'Arith' is not defined /Users/smcho/Desktop/cs/namespace/testcs.fs(3,9): error FS0039: The value or constructor 'Add' is not defined
O que pode estar errado? Eu usei mono para ambiente .NET.