public void ControlFlowWithForStatement()

in 01-Navigation/4-Contextual_navigation/4.4-Navigate_To_menu_control_flow.cs [23:46]


        public void ControlFlowWithForStatement()
        {
            for (int i = 0; i < Children.Count; i++)
            {
                var child = Children[i];

                // a) Place the caret on "continue". Navigate to → Control Flow Target
                //    takes the caret to the i++ in the for declaration
                if (ShouldSkipChild(child))
                    continue;

                // b) Place the caret on "break". Navigate to → Control Flow Target
                //    takes the caret to the next statement after the loop
                if (ShouldStop(child))
                    break;

                // c) Place the caret on "return". Navigate to → Control Flow Target
                //    takes the caret to the closing brace of the function
                if (ShouldQuit(child))
                    return;
            }

            Console.WriteLine("Finished loop");
        }