Catel.Fody.InstructionListExtensions.MoveInstructionsToEnd C# (CSharp) Method

MoveInstructionsToEnd() public static method

public static MoveInstructionsToEnd ( this instructions, int startIndex, int length ) : void
instructions this
startIndex int
length int
return void
        public static void MoveInstructionsToEnd(this IList<Instruction> instructions, int startIndex, int length)
        {
            var instructionsToMove = new List<Instruction>();
            for (int i = startIndex; i < startIndex + length; i++)
            {
                instructionsToMove.Add(instructions[startIndex]);
                instructions.RemoveAt(startIndex);
            }

            Insert(instructions, instructions.Count - 1, instructionsToMove);
        }