I was told that the assembly files made from C# and F# source is interoperable as they are compiled into .NET assembly.
Any example code would be great.
1) Yes. Using a simple example, in F#, I can invoke the main method of a C# console app:
open SampleApp
SampleApp.Program.Main([| "Hello"; "World" |])
2) For the DLR, I think things are a bit different. I believe this is how you would execute Python (for example);
ScriptEngine engine = Python.CreateEngine();
ScriptSource script = engine.CreateScriptFromSourceFile("myPythonScript.py");
ScriptScope scope = engine.CreateScope();
script.Execute(scope);
My syntax may be off a bit - but you should be able to get the gist.
3) You need to download some special DLR DLLs - and then reference them in your C# / F# application in order to be interoperable. They should be available from the Microsoft DLR site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With