我有对象流,可以是int,short,long,float等数字类型...
将其转换为数字的最佳方法是什么?最好的方式可能是某种东西
ToNumber(object oNumber)
// Best magic could be
var number = (somemagic) oNumber;
float operator1 = oNumber is int
? (float)(int)oNumber
: oNumber is long
? (float)(long)oNumber
: oNumber is float
? (float)oNumber
: (float)(int)oNumber;
假设float将能够取所有数字期望加倍