Update: Have received a brilliant reply on Stack Overflow -

type Foo =

| A of int

| B of string

let CallWithDefault f =

let x = Unchecked.defaultof<_>

f x

let defaultA = CallWithDefault A

let defaultB = CallWithDefault B

printfn "(%A) (%A)" defaultA defaultB

At [link:stackoverflow.com]

Which solves my problem beautifully! :-)

By on 4/8/2009 8:19 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper