Hi all,
I have a situation where I have two objects, and if they are both any
kind of numeric, I need to perform some opration on them (such as
multiple or divide).
I'd like to do so without a huge case statement. Any ideas on how to
easily do this?
Thanks
Andy
Peter Morris [Droopy eyes software] - 29 Aug 2006 16:18 GMT
Always work on Decimal values and convert everything to a Decimal before
operating on it?
Andy - 30 Aug 2006 11:44 GMT
Thanks Peter,
That is what I ended up doing. I then look at the typecode of the
first operand and use decmial.ToXXX methods to convert to the next
type. Seems to fit my requirements.
Andy
> Always work on Decimal values and convert everything to a Decimal before
> operating on it?
Arne Vajhøj - 30 Aug 2006 00:18 GMT
> I have a situation where I have two objects, and if they are both any
> kind of numeric, I need to perform some opration on them (such as
> multiple or divide).
>
> I'd like to do so without a huge case statement. Any ideas on how to
> easily do this?
Not possible.
Arne