public void Option() { IsTrue(FSharpOption <int> .get_IsNone(FSharpOption <int> .None)); Equal(FSharpOption <int> .None, null); Equal(FSharpOption <int> .GetTag(FSharpOption <int> .None), 0); Equal(FSharpOption <int> .GetTag(FSharpOption <int> .Some(2)), 1); Equal(FSharpOption <int> .Some(3).Value, 3); Equal(FSharpOption <int> .Some(1), FSharpConvert.Some(1)); Equal(FSharpConvert.Option((int?)1), FSharpOption <int> .Some(1)); }
public void ImplicitConversions() { FSharpOption <int> o = 3; Equal(o, FSharpConvert.Some(3)); }