Tengo el siguiente código C#.Cómo usar el objeto C# de F #?
namespace MyMath {
public class Arith {
public Arith() {}
public int Add(int x, int y) {
return x + y;
}
}
}
Y se me ocurrió el código F # llamado testcs.fs para usar este objeto.
open MyMath.Arith
let x = Add(10,20)
Cuando ejecute el siguiente comando
fsc -r:MyMath.dll testcs.fs
Tengo este mensaje de error.
/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
¿Qué podría estar mal? Utilicé mono para entorno .NET.
Funciona bien. Gracias. – prosseek