F# - Static generic classes

by Gregor Uhlenheuer on May 6, 2012

Recently I tried to build a static generic class in F# but as it seems there is no direct way to do it. To see what I want to build, here is what could look like in C#:

The closest I could get in F# looks like the following. Since there are no static classes in F# at all you have to use a type with a private constructor and static member definitions:

This post is tagged with f#, .net and generics