I have a variable from:
double result = myList.Count / mySeptum;
I want to do the following:
if( result == int ) {
//Do Something...
}
else{
//Do another thing...
}
How can I do this?
I also tried this, but it didn't work:
if ( result%10 == 0 ){
...
}
In an example:
private void button2_Click(object sender, EventArgs e)
{
int r = 10;
int l = 2;
double d = r / l;
if (d % 10 == 0)
{
Console.WriteLine("INTEGER");
}
else
{
Console.WriteLine("DOUBLE");
}
}