AsterixDisplayAnalyser.BitExtractor.Extract C# (CSharp) Метод

Extract() публичный Метод

public Extract ( int StartBit, int EndBit, UInt32 From ) : UInt32
StartBit int
EndBit int
From System.UInt32
Результат System.UInt32
        public UInt32 Extract(int StartBit, int EndBit, UInt32 From)
        {
            // Declare 32 character mask defaulted '0';
            char[] array = new string('0', 32).ToCharArray();

            // Set the mask bits as specifed by the parameters
            for (int I = (31 - EndBit); I <= (31 - StartBit); I++)
                array[I] = '1';

            // Extract and return the data
            return (Convert.ToUInt32(new string(array), 2) & From);
        }

Same methods

BitExtractor::Extract ( int StartBit, int EndBit, System.UInt64 From ) : System.UInt64