1 // Compiler options: -r:gtest-optional-11-lib.dll
4 using System
.Reflection
;
5 using System
.Runtime
.InteropServices
;
9 public static int TestA ([Optional
][DefaultParameterValue (1)] int u
)
14 public static T TestB
<T
> (T a
, [Optional
] T u
)
19 public static object TestC ([Optional
] object a
)
24 public static int TestD ([Optional
] int a
, int i
)
29 public static int Main ()
37 if (TestB ((object) null) != Missing
.Value
)
40 if (TestC () != Missing
.Value
)
46 if (Lib
.TestA () != 1)
49 if (Lib
.TestB (-4) != 0)
52 if (Lib
.TestB ((object) null) != Missing
.Value
)
55 if (Lib
.TestC () != Missing
.Value
)
58 if (Lib
.TestC2 () != null)
61 if (Lib
.TestD (i
:2) != 0)