Try doing it like this:

```
double d = (0.1 + 0.7);
int v = (int)(d * 10);
Console.WriteLine(v);
```

And look at the value of `d`

in the debugger.It's not what you expect - 0.8 - but 7.9999999999999999 instead.

Why? Because base 10 and base 2 do not "play nice" all the time, and a fractional value that is "solid" in base 10 (like 0.1 + 0.7) is not so solid in base 2.

Try using decimal values:

```
decimal d = (0.1M + 0.7M);
int v = (int)(d * 10);
Console.WriteLine(v);
```

And it'll do what you expected.
Think of it!

http://msdn.microsoft.com/en-us/library/yht2cx7b.aspx