Declaration
public static long UnboxIntegerToLong(
object integer
)Summary
C# does not allow a boxed integer type to be unboxed as anything other
than the true type of the boxed integer. This utility function unboxes the
integer as the correct type and then casts it to a long, returning the result.
Throws an exception if the object is null or not one of the built-in integer
types.
Does not support unboxing of a ulong because the cast to long would be lossy
and misleading. Will throw an exception when given a boxed ulong.