Firstly, this question is not a duplicate of this question. Other than the title it has absolutely nothing in common.
Now...
In C#, consider the following situations:
int i = (int)10.0;
const double D = 10.0;
float f = (float)d;
enum Foo : int
{
FIRST_ITEM = 0
}
int i = (int)Foo.FIRST_ITEM;
In which of these situations does the typecasting happen at runtime? I currently feel like obsessing over my program's performance a little, and was wondering whether this would have any (no matter how small) influence.