You can also do this:

1
2
3
4
5
6
7
8
9
10
 

type MyDU =
    | Foo of int
    | Bar of string * int
let d = Foo(42)
let (Foo(x)) = d  // this line
printfn "%d" x

but you still get the warning.

By on 5/20/2009 12:22 PM ()
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