Microsoft.Scripting.Utils.MathUtils.GetWord C# (CSharp) Method

GetWord() private static method

private static GetWord ( byte bytes, int start, int end ) : uint
bytes byte
start int
end int
return uint
        private static uint GetWord(byte[] bytes, int start, int end) {
            uint four = 0;
            int bits = end - start;
            int shift = 0;
            if (bits > 32) {
                bits = 32;
            }
            start /= 8;
            while (bits > 0) {
                uint value = bytes[start];
                if (bits < 8) {
                    value &= (1u << bits) - 1u;
                }
                value <<= shift;
                four |= value;
                bits -= 8;
                shift += 8;
                start++;
            }

            return four;
        }

Same methods

MathUtils::GetWord ( this self, int index ) : uint