In class/Microsoft.Build.Tasks:
[mcs.git] / tests / gtest-optional-02.cs
blobabc16080565889bcd8251842ba2d1dd8b6db50fd
1 using System;
3 public class C
5 public static bool Test3 (int? i = new int ())
7 return i == 0;
10 public static bool Test2 (int? i = null)
12 return i == null;
15 public static int Test (int? i = 1)
17 return i ?? 9;
20 public static int Main ()
22 if (Test () != 1)
23 return 1;
25 if (Test (null) != 9)
26 return 2;
28 if (!Test2 ())
29 return 3;
31 if (Test2 (3))
32 return 4;
34 if (!Test3 ())
35 return 5;
37 return 0;