System.IO.BinaryReader.ReadUInt64 C# (CSharp) Method

ReadUInt64() private method

private ReadUInt64 ( ) : ulong
return ulong
        public virtual ulong ReadUInt64()
        {
            FillBuffer(8);
            uint lo = (uint)(_buffer[0] | _buffer[1] << 8 |
                             _buffer[2] << 16 | _buffer[3] << 24);
            uint hi = (uint)(_buffer[4] | _buffer[5] << 8 |
                             _buffer[6] << 16 | _buffer[7] << 24);
            return ((ulong)hi) << 32 | lo;
        }

Usage Example

		/* private ushort _padding; */

		/// <summary>
		/// Stream constructor.
		/// </summary>
		/// <param name="stream">The stream that contains the DirectorySectorEntry data.</param>
		public DirectorySectorEntry(Stream stream)
		{
			Debug.Assert(stream.Length >= Constants.DIR_ENTRY_SIZE);
			BinaryReader reader = new BinaryReader(stream);

			_name = Reader.ReadSimpleUnicodeString(reader, 64);
			_nameLength = reader.ReadUInt16();
			if(_nameLength > 0)
			{
				_nameLength /= 2;
				--_nameLength;
				_name = _name.Substring(0, _nameLength);
			}
			else
				_name = "";

			_type = (Stgty)reader.ReadByte();
			_color = (DeColor)reader.ReadByte();
			_leftSibling = new Sid(reader.ReadUInt32());
			_rightSibling = new Sid(reader.ReadUInt32());
			_child = new Sid(reader.ReadUInt32());
			_clsId = new Guid(reader.ReadBytes(16));
			_userFlags = reader.ReadUInt32();
			_createTimeStamp = reader.ReadUInt64();
			_modifyTimeStamp = reader.ReadUInt64();
			_sectStart = new Sect(reader.ReadUInt32());
			_size = reader.ReadUInt32();
			_propType = reader.ReadUInt16();
			/* _padding = */ reader.ReadUInt16();
		}
All Usage Examples Of System.IO.BinaryReader::ReadUInt64