static public ToDecimal ( byte buffer, int offset, int count ) : decimal | ||
buffer | byte | |
offset | int | |
count | int | |
Результат | decimal |
public decimal ToDecimal() { ValueHandleType type = _type; if (type == ValueHandleType.Decimal) { return(GetDecimal()); } if (type == ValueHandleType.Zero) { return(0); } if (type == ValueHandleType.One) { return(1); } if (type >= ValueHandleType.Int8 && type <= ValueHandleType.Int64) { return(ToLong()); } if (type == ValueHandleType.UInt64) { return(GetUInt64()); } if (type == ValueHandleType.UTF8) { return(XmlConverter.ToDecimal(_bufferReader.Buffer, _offset, _length)); } return(XmlConverter.ToDecimal(GetString())); }
public decimal ToDecimal() { ValueHandleType type = this.type; switch (type) { case ValueHandleType.Decimal: return(this.GetDecimal()); case ValueHandleType.Zero: return(0M); case ValueHandleType.One: return(1M); } if ((type >= ValueHandleType.Int8) && (type <= ValueHandleType.Int64)) { return(this.ToLong()); } if (type == ValueHandleType.UInt64) { return(this.GetUInt64()); } if (type == ValueHandleType.UTF8) { return(XmlConverter.ToDecimal(this.bufferReader.Buffer, this.offset, this.length)); } return(XmlConverter.ToDecimal(this.GetString())); }