A
Andrew Murray
Is it possible to compare a double with a float in c# without casting to
one of the types first?
It appears you cannot...
float num = 1.545f;
double dnum = 1.545;
if (dnum == num)
{
Console.WriteLine("You can");
}
else
{
Console.WriteLine("You cant");
}
one of the types first?
It appears you cannot...
float num = 1.545f;
double dnum = 1.545;
if (dnum == num)
{
Console.WriteLine("You can");
}
else
{
Console.WriteLine("You cant");
}