Note that bitwise or uses three vertical bars:

[link:msdn.microsoft.com]

1
2
3
4
5
6
7
8
9
10
11
12
13
 

[<System.Flags>]
type MyEnum =
    | A = 1
    | B = 2
    | C = 4

let z = MyEnum.A ||| MyEnum.C
printfn "%A" z       // A, C
printfn "%d" (int z) // 5    

By on 11/25/2009 1:12 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