This is very linked to the question here How to enumerate an enum/type in F#. I define a union type and then I need to use all the possible cases of the type in static method. For example:
type Interests =
| Music
| Books
| Movies
with
static member GetValue( this) = match this with
| Music -> 0
| Books -> 5
| Movies -> 0
static member GetSeqValues() = allCases|>Seq.map(GetValue)
How do I get allCases ?
Thanks a lot