Hmm, this may seems a simple question, but I would like to know the fastest way.
I have an object which is a boxed number, I don't know is it double
, int
, or some numeric type. I want to check if the boxed value is negative.
I use this conversion but I am not sure if it is as fast as can be:
private bool CheckNegative(object number)
{
return System.Convert.ToDouble(number) < 0;
}
Arsen