To expand on what Bill has - rightly - said ...
C# is a "strongly typed" language, which means that it assumes you know what you are doing, and it doesn't - so it won't make an assumption about what you want and convert data from type to type for you, unless that conversion would result in a very similar type without any loss of information.
So it will happily "upgrade" an integer to a float or double:
int x = 666;
float y = x;
int x = 666;
double y = x;
because both types are numeric and there is no loss of data.But it won't convert the other way:
float x = 666.0f;
int y = x;
double x = 666.0;
int y = x;
because integers can't store fractional parts of a number.
To do that, you have to explicitly tell the system what you want to do using a cast operation:
float x = 666.0f;
int y = (int) x;
double x = 666.0;
int y = (int) x;
And the same applies when you try to do this:
int x = 666;
string y = x;
will fail because the two types are too different and you can't cast between them.
To assign a numeric value to a string, you have to explicitly tell the system to do the conversion:
int x = 666;
string y = x.ToString();
And the ToString method can take a parameter which tells it how to format the number when you convert it:
UInt32.ToString Method (System) | Microsoft Docs[
^]