O'Reilly logo

Real-World Functional Programming with Examples in F# and C# by Jon Skeet, Tomas Petricek

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

Chapter 9. Turning values into F# object types with members

This chapter covers

  • Declaring types with members
  • Using interfaces in a functional way
  • Writing class and interface types
  • Using F# code from C#

When we introduced F# in chapter 1, we described it as a multiparadigm language that takes the best elements of several worlds. Most importantly, it takes ideas from both functional and object-oriented languages. In this chapter, we’re going to look at several features inspired by OOP or that allow fluent integration with object-oriented .NET languages like C# and Visual Basic .NET (VB.NET).

This chapter is particularly important for the later steps in the F# development process. As we’ve mentioned, functional simplicity allows us to write ...

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