ToUInt64() public static method

Constructs a System.UInt64 from bytes at a given offset in a byte array.
public static ToUInt64 ( byte array, int startIndex ) : ulong
array byte The array with the bytes to use.
startIndex int The offset at which the number starts.
return ulong
Esempio n. 1
0
 /// <inheritdoc />
 public bool TryReadUInt64(out ulong value)
 {
     if (CanAdvance(8))
     {
         int start = UncheckedAdvance(8);
         value = LittleEndianBitConverter.ToUInt64(_buffer, start);
         return(true);
     }
     else
     {
         return(Misc.Fail(out value));
     }
 }
Esempio n. 2
0
        /// <inheritdoc />
        /// <inheritdoc cref="CheckedAdvance" select="exception[@cref='PacketReadingException']" />
        public ulong ReadUInt64()
        {
            int start = CheckedAdvance(8);

            return(LittleEndianBitConverter.ToUInt64(_buffer, start));
        }