BACnet.Tagging.TagReader.ReadUnsigned64 C# (CSharp) Method

ReadUnsigned64() public method

Reads an unsigned tag from the stream
public ReadUnsigned64 ( byte tag = 255 ) : ulong
tag byte The tag number of the unsigned tag, or 255 for an application tag
return ulong
        public ulong ReadUnsigned64(byte tag = 255)
        {
            _ensureTag(tag, ApplicationTag.Unsigned);
            _ensureLength(1, 8);

            ulong value = _reader.ReadByte();
            for(int i = 1; i < _length; i++)
            {
                value <<= 8;
                value |= _reader.ReadByte();
            }

            return value;
        }