Very, very unsuitable. Use decimal.
double x = 3.65, y = 0.05, z = 3.7;
Console.WriteLine((x + y) == z); // false
(example from Jon’s page here – recommended reading ;-p)
More Related Contents:
- decimal vs double! – Which one should I use and when? [duplicate]
- How can I format decimal property to currency?
- Allow only decimal numbers in textbox in C#
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- How do I display a decimal value to 2 decimal places?
- How to convert numbers between hexadecimal and decimal
- How do you round a number to two decimal places in C#?
- When should I use double instead of decimal?
- Formatting a float to 2 decimal places
- Why can’t I unbox an int as a decimal?
- How to convert a Decimal to a Double in C#?
- Regular expression for decimal number
- What does the M stand for in C# Decimal literal notation?
- What does the word “literal” mean?
- Currency format for display
- Arbitrary-Precision Decimals in C# [duplicate]
- Convert any currency string to double
- Why are const parameters not allowed in C#?
- Convert string to decimal, keeping fractions
- String to decimal conversion: dot separation instead of comma
- use decimal values as attribute params in c#?
- Rounding down to 2 decimal places in c#
- Performing Math operations on decimal datatype in C#?
- How to convert Decimal to Double in C#?
- Culture invariant Decimal.TryParse()
- Get the currency from current culture?
- Regex for Money
- Why am I getting a compile error when multiplying a decimal by a literal value?
- C# Check if a decimal has more than 3 decimal places?
- How do I convert a decimal to an int in C#?