using System;
using System.Collections.Generic;
using System.Text;
namespace SingleToInt
{
class Program
{
static void Main(string[] args)
{
Single s = (Single)1111.87;
int i = (int)s;
Console.WriteLine(i);
Console.ReadLine();
}
}
}
Be aware that the range of float is much larger than the range of int,
however...
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.