By 18/02/2016 15 Comments

Difference Between Decimal And Double In C#

  • double and decimal data types both are used for storing frictional point values.
  • double is used for calculations such as mathematical problems, value of earth gravity etc.
  • decimal is used for monetary calculations such as money, accounting problems etc.
  • The value of decimal is suffixed with m character. Character m indicates that it is a decimal value.


using System;

namespace Examples
    class Program
        static void Main(string[] args)
            double pi = 3.14;
            decimal bookPrize = 1500.8m;

            Console.WriteLine("PI: " + pi);
            Console.WriteLine("Book prize: " + bookPrize);

Posted in: C#.NET, Solutions

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .