Convert the leftmost four bytes of an array to an unsigned 32-bit integer.
public static uint NumFromBytes( byte[] b, Cnv.EndianNess endn )
Public Shared Function NumFromBytes ( _ b As Byte(), _ endn As Cnv.EndianNess _ ) As UInteger
byte[] b = new byte[4] { 0xde, 0xad, 0xbe, 0xef }; uint nb = Cnv.NumFromBytes(b, Cnv.EndianNess.BigEndian); Console.WriteLine("0x" + nb.ToString("x8")); // 0xdeadbeef uint nl = Cnv.NumFromBytes(b, Cnv.EndianNess.LittleEndian); Console.WriteLine("0x" + nl.ToString("x8")); // 0xefbeadde
VB6/C equivalent: CNV_NumFromBytes