public static long ReadInt64(NetworkBinaryReader reader) { object value = ReadNonnullObject("long", reader); if (value is long || value is int || value is short || value is byte) { return((long)value); } if (value is string) { return(PrimitiveParser.ParseLong((string)value)); } throw PrimitiveParser.CreateProtocolViolationException("long", value); }
public static long ReadInt64(NetworkBinaryReader reader) { object value = ReadNonnullObject("long", reader); if (value is long || value is int || value is short || value is byte) { return((long)value); } if (value is string) { return(PrimitiveParser.ParseLong((string)value)); } PrimitiveParser.InvalidConversion("long", value); return(0); }