Advanced Functional Prog.


Interoperability with C#

But the F# library can also be used within a C# application :-)

dotnet new console -lang "F#" -n "demo" -o .
dotnet add demo.fsproj reference Library.fsproj

With the following main:

// Program.cs
using Library;
class Demo {
	static void Main(string[] argv) {
		Console.WriteLine(Library.Library.v);
	}
}

And execution:

dotnet build demo2.csproj
bin/Debug/net7.0/demo2