After researching, it became obvious that double variable may have wrong values and even if you print the variable as it is (without rounding or whatever), it may print a different value than the variable really has. Therefore you shouldn't use it as dictionary key. Just take this example of the screenshot. (All involved fields are type double. I solved it by casting the two variables in the red box each into integers and multiplying them by 100000: while ((int)(fCounter * 1000000) > (int)(TickSize * 1000000))
)
My question is, can you / should you use doubles for anything at all? I could imagine for temporarily holding a value for a print, it may be okay. But is there any other area where you could use them?