The language has an implicit conversion built into it.
The following table is provided in the documentation , so you are allowed to assign a value without explicit translation or conversion:
From To =============================================================================== sbyte short , int, long, float, double, or decimal byte short , ushort, int, uint, long, ulong, float, double, or decimal short int , long, float, double, or decimal ushort int , uint, long, ulong, float, double, or decimal int long , float, double, or decimal uint long , ulong, float, double, or decimal long float , double, or decimal char ushort , int, uint, long, ulong, float, double, or decimal float double ulong float , double, or decimal
And in the documentation it says (my attention):
Accuracy, but not magnitude, can be lost when switching from int, uint, long or ulong to float and from long or ulong to double .