Trying to define an Int32 variable here, but need it to return whole number, not decimals.
So I have this:
Int32 HalfCount = Convert.ToInt32(Math.Round(11 / 2, 0));
But get error.
Than I use this:
Int32 HalfCount = Math.Round(11/2);
Get another error. Can not convert Double to Decimal or something like that.
How am I supposed to declare an Int32 to be rounded in half? Or does Int32 automatically round it?
Could I just do this?
Int32 HalfCount = (11/2);
Doesn't look like a syntax error, but I have to know before I run the code, cause it will jack everything up if it is wrong.
I just need to return a whole number (without decimals), I don't care which way it goes (up or down is fine by me).