SyntaxFix
Write A Post
Hire A Developer
Questions
You don't even need to cast, it is implicit.
int i = 3; float f = i;
A full list/table of implicit numeric conversions can be seen here http://msdn.microsoft.com/en-us/library/y5b434w4.aspx