decimal.MaxValue should be a constant

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Günter Zöchbauer (zoechi_at_gmx.net)
Date: 06/01/04


Date: Tue, 1 Jun 2004 11:10:21 +0200

can anyone tell why

[DefaultValue(int.MaxValue)] is valid

but

[DefaultValue(decimal.MaxValue)] produces compiler error:

An attribute argument must be a constant expression, typeof expression or
array creation expression



Relevant Pages