Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / nullable_boxing.2.cs
1 using System;
2
3 public class Program {
4                 
5         internal class Button  : ContextBoundObject
6         {
7                 public int Counter (int? x)
8                 {
9                         if (x == null)
10                                 return 0;
11                         return x.Value + 1;
12                 }
13                 
14                 public static Button TheButton = new Button ();
15         }
16
17         public static int Main ()
18         {
19                 // Test remoting and nullables
20                 if (Button.TheButton.Counter (1) != 2)
21                         return 1;
22
23                 int?[] x = new int?[] { null };
24                 return x.GetValue (0) == null ? 0 : 2;
25         }
26 }