3/8 performs an integer division and the result is 0
double result = ((3.0/8)*100);
should do it.
By the way, if you do ((3.0/8)*100).ToString() you get a String and not a double.
More Related Contents:
- How to generate an Array of Double Arrays in c#? [duplicate]
- Why does integer division in C# return an integer and not a float?
- Division result is always zero [duplicate]
- How do I parse a string with a decimal point to a double?
- When should I use double instead of decimal?
- Comparing double values in C#
- How To Represent 0.1 In Floating Point Arithmetic And Decimal
- decimal vs double! – Which one should I use and when? [duplicate]
- C# is rounding down divisions by itself
- Converting string to double in C#
- C# Double – ToString() formatting with two decimal places but no rounding
- How to change symbol for decimal point in double.ToString()?
- Double precision problems on .NET
- Limiting double to 3 decimal places
- Formatting a double to two decimal places
- Double.TryParse or Convert.ToDouble – which is faster and safer?
- What’s the best way to compare Double and Int?
- Conversion of a decimal to double number in C# results in a difference
- Why is a round-trip conversion via a string not safe for a double?
- Performing Math operations on decimal datatype in C#?
- Input string was not in a correct format #2
- How to convert Decimal to Double in C#?
- How can I calculate divide and modulo for integers in C#?
- Why c# decimals can’t be initialized without the M suffix?
- Round double in two decimal places in C#?
- Converting a double to an int in C#
- Formatting a string into columns using String Interpolation
- Why is this simple calculation of two doubles inaccurate? [duplicate]
- C# Converting 20 digit precision double to string and back again
- double minus double giving precision problems