Merge pull request #5406 from kumpera/fix_12157
[mono.git] / mono / tests / dbnull-missing.cs
1 using System;
2 using System.Reflection;
3 using System.Runtime.InteropServices;
4
5 class X {
6         static int Main ()
7         {
8                 ParameterInfo [] pi = typeof (X).GetMethod ("TakesInt").GetParameters ();
9
10                 Console.WriteLine ("{0} and {1}", pi [0].DefaultValue.GetType (), pi [1].DefaultValue.GetType ());
11                 if (pi [0].DefaultValue.GetType () != typeof (DBNull))
12                         return 1;
13                 if (pi [1].DefaultValue.GetType () != typeof (Missing))
14                         return 2;
15                 return 0;
16         }
17
18         public static void TakesInt (int b, [Optional] int a)
19         {
20         }
21 }