I was experimenting with the const
modifier while exploring a plethora of C# tutorials, and placed a bunch of const
modifiers in a class like this
Int is a simple value type of a fixed size. Decimal is a bit more complicated due to scale. If you decompile your code, you'll find that it looks like this:
[DecimalConstant(0, 0, 0, 0, 1)]
private readonly static decimal somedecimal;
private const int someint = 2;
Where the decimal is not a constant, but has a DecimalConstant attribute courtesy of mscorlib.dll, where the true definition if decimal is:
public struct Decimal : IFormattable, IComparable, IConvertible,
IDeserializationCallback, IComparable<decimal>, IEquatable<decimal>
Much more in-depth exploration of this topic is covered in this blog post.