public static int UseNullable(MyNullable <int> optY) { if (optY.HasValue) { return(optY.Value); } return(0); }
public static void Pass(MyNullable <int> x) { Contract.Requires(x.HasValue); }
public static int UseNullable2(int x) { MyNullable <int> y = x; return(y.Value); }
public static int UseNullable1(int x) { MyNullable <int> y = new MyNullable <int>(x); return(y.Value); }
public static void Test1(MyNullable <int> optInt) { int x = optInt.Value; }