public static void ForLoop() { LinkedList temp = new LoopClass("for (int i = 0; i < array.Length; i++)", "{", "", "}").ToList(); string[] LoopArray = Tools.ArrayMaker(temp); Tools.Header(); string firstMsg = "Today we are going to talk about the "; string loopStart = "for "; string brack = "("; string loopVar = "int "; string iEquals = "i = "; string zero = "0"; string loopEnd = "; i < array.Length; i++)\n{\n\n}\n\n"; string endFirstMsg = "If this is your first time seeing this it can be intimidating.\n" + "There seems to be a lot going on and to be honest there is.\n"; Tools.LoopReader(firstMsg); Tools.Highlighter("for loop"); Tools.LoopReader(Tools.BlackText(" in .Net!! \nThe ")); Tools.Highlighter("for loop"); Tools.LoopReader(Tools.BlackText(" that we use today will look like this\n\n")); Tools.LoopReader(Tools.BlueText(loopStart)); Tools.LoopReader(Tools.BlackText(brack)); Tools.LoopReader(Tools.BlueText(loopVar)); Tools.LoopReader(Tools.BlackText(iEquals)); Tools.LoopReader(Tools.YellowText(zero)); Tools.StringReader(Tools.BlackText(loopEnd)); Tools.StringReader(Tools.BlackText(endFirstMsg)); string LoopCont = Tools.SelectionScreen("for loop"); Lesson(LoopArray, LoopCont); }
public static void ForeachLoop() { LinkedList temp = new LoopClass("foreach (int num in array)", "{", "", "}").ToList(); string[] LoopArray = Tools.ArrayMaker(temp); Tools.Header(); string firstMsg = "Today we are going to talk about the "; string loopStart = "foreach "; string brack = "("; string loopVar = "int "; string num = "num "; string locale = "in"; string loopEnd = " array)\n{\n\n}\n\n"; string endFirstMsg = "If this is your first time seeing this you may be confused.\n" + "This lesson that I have for you will help put you at ease.\n"; Tools.LoopReader(firstMsg); Tools.Highlighter("foreach loop"); Tools.LoopReader(Tools.BlackText(" in .Net!! \nThe ")); Tools.Highlighter("foreach loop"); Tools.StringReader(Tools.BlackText(" that we use today will look like this\n\n")); Tools.LoopReader(Tools.BlueText(loopStart)); Tools.LoopReader(Tools.BlackText(brack)); Tools.LoopReader(Tools.BlueText(loopVar)); Tools.LoopReader(Tools.BlackText(num)); Tools.LoopReader(Tools.BlueText(locale)); Tools.StringReader(Tools.BlackText(loopEnd)); Tools.StringReader(endFirstMsg); string LoopCont = Tools.SelectionScreen("foreach loop"); Lesson(LoopArray, LoopCont); }