Adding a int and a float?

This seems like a dumb question but is there no way to covert ints to floats and vice versa to add them together? I figured something like this would work
int num = Mathf.round(myFloat);
but it doesn’t. Anyway around this? or should I just use floats for everything and round?

Mathf.Round (Don’t forget the capital R, syntax matters) will still return a float, although it will be rounded to the nearest integer. If you want to then turn this float into an int, you need to convert it. Try using something like this:

int num = Convert.ToInt32(Mathf.Round(myFloat));

Hmm, tried that, I get the error 'The name ‘Convert’ does not exist in the current context. And I always have had the R capitilized, just missed it in my example question. Thanks for the reply anyways