O'Reilly logo

Get Programming with F#: A guide for .NET developers by Isaac Abraham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 25. Consuming C# from F#

In the real world, you’ll be hard-pressed to write a purely F# application. Not only are most of the NuGet packages out there written in C#, but the entire BCL is too. You’ve been working with C# types and objects from F# and so you know how to deal with the basics already, but a few extra areas are worth touching upon in order to round off this subject. We’ll look at these topics:

  • Creating hybrid solutions
  • Using Visual Studio tools
  • Consuming assemblies from scripts
  • Consuming classes and interfaces in F#
  • Safely working with nullable objects in F#

25.1. Referencing C# code in F#

In addition to working with the BCL code base, virtually any C# code you write today can be consumed from F#. This includes the following: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required