Aşağıdaki C# kodum var.C# nesnesi nasıl kullanılır?
namespace MyMath {
public class Arith {
public Arith() {}
public int Add(int x, int y) {
return x + y;
}
}
}
Bu nesneyi kullanmak için testcs.fs adlı F # kodu ile geldim.
open MyMath.Arith
let x = Add(10,20)
aşağıdaki komutu
fsc -r:MyMath.dll testcs.fs
Bu hata mesajı var çalıştırdığınızda.
/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
Neyin yanlış olabilir? .NET ortamı için mono kullanıyorum. Arith
yana
İyi çalışıyor. Teşekkürler. – prosseek