Quick and dirty…
if (x == (int)x)
{
...
}
edit: This is assuming x is already in some other numeric form. If you’re dealing with strings, look into Integer.parseInt.
Quick and dirty…
if (x == (int)x)
{
...
}
edit: This is assuming x is already in some other numeric form. If you’re dealing with strings, look into Integer.parseInt.