ToUInt32() public static method

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

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