IsNumeric() static private method

Returns true if the type is a signed or unsigned short or larger integer.
static private IsNumeric ( Type type ) : bool
type System.Type The to compare.
return bool
Beispiel #1
0
 public void IsNumeric()
 {
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(short)));
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(int)));
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(long)));
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(ushort)));
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(uint)));
     Assert.IsTrue(EncodingConverter.IsNumeric(typeof(ulong)));
     Assert.IsFalse(EncodingConverter.IsNumeric(typeof(byte)));
     Assert.IsFalse(EncodingConverter.IsNumeric(typeof(float)));
     Assert.IsFalse(EncodingConverter.IsNumeric(typeof(double)));
 }