[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / test-382.cs
blob8ac9678ddf7d02013ba09644a3b406c0c76b1ea8
1 using System;
2 using System.Reflection;
4 class Dec {
5 public const decimal MinValue = -79228162514264337593543950335m;
6 public static void Main ()
8 System.Console.WriteLine ("Compiler said value is {0}", MinValue);
9 FieldInfo fi = typeof (Dec).GetField ("MinValue");
10 Decimal d = (Decimal) fi.GetValue (fi);
11 System.Console.WriteLine ("Reflection said value is {0}", d);
13 if (d != MinValue)
14 throw new Exception ("decimal constant not initialized");