▲ | gwbas1c 3 days ago | |||||||||||||||||||||||||
That's just like how C# and VB.Net can co-exist in the same project. Would you pick the pattern of: 1: C# Library with interfaces and/or abstract base classes 2: F# library with implementations of those interfaces and base classes 3: C# program (console, web service, GUI, ect) that specifies the implementations in Dependency Injection Or is there a simpler way for C# and F# to co-exist in the same project (dll or exe)? | ||||||||||||||||||||||||||
▲ | int_19h 2 days ago | parent [-] | |||||||||||||||||||||||||
You don't really need to split 1 & 2, since F# can define .NET interfaces and abstract classes just fine. For that matter, you don't even need the interfaces if you wouldn't have had them in a C#-only solution. Just define the class in F# and use it directly from C#. You still need a separate assembly for F#, but that doesn't imply dependency injection - again, just reference it and use it. | ||||||||||||||||||||||||||
|