2007-05-25 Jonathan Chambers <joncham@gmail.com>
[mcs.git] / tests / test-382.cs
blob0ba8af290e57331797034aadc8890815193e8b6d
1 using System;
2 using System.Reflection;
4 class Dec {
5 public const decimal MinValue = -79228162514264337593543950335m;
6 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");