I'd like to do the following:
Program.cs:
Code.fs:
Clearly, simply by adding these two files into a VS 2008 (.NET 3.5, F# add-on installed) console application project, it doesn't work, but I haven't got much of a clue about how to solve it myself. I've checked out manuals and howtos which talk about assembly-referencing, but besides I don't really know what an assembly is, I guess what I want to do is to put both, the c# class and the f# module into the same assembly. C# classes can mutually recursively reference each other, so I guess it should be possible using several languages, too.
But how to get my Visual Studio doing this?
Any hint about how to compile it (or anything similar !) without VS would be greatly appreciated, too.
Thanks a lot.
Paolo
Program.cs:
Code:
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("cs main");
ConsoleApplication1.Code.brain();
}
static void Pain()
{
System.Console.WriteLine("cs pain");
}
}
}
Code:
module ConsoleApplication1.Code let brain () = printf "fs brain\n"; ConsoleApplication1.Program.Pain ()
But how to get my Visual Studio doing this?
Any hint about how to compile it (or anything similar !) without VS would be greatly appreciated, too.
Thanks a lot.
Paolo