Both the integer and floating point families of C# variable types have some limitations. Integers can only handle whole numbers, resulting in the fractional part of a value being stripped off. Floats, on the other hand, have problems with rounding accuracy. Clearly the best of both worlds is sometimes needed and to address this requirement the ''decimal'' variable type is provided. The ''decimal'' type is a compromise between integers and float variable types in that it can store fractional parts of a value and provide exact values in computations.
The ''decimal'' variable type is
cable of holding values in the range 10<sup>-28</sup> all the way up to 10<sup>28</sup> with none of the rounding problems associated with floating point variable types .