public void PassCourseMaterials() { var infinity = true; while (infinity) { Console.WriteLine("1 - videos\t2 - books\t3 - articles\t4 - pass course test\n"); switch (Console.ReadLine()) { case "1": Console.Clear(); materialHelper.VideoMaterials(videoMaterials); break; case "2": Console.Clear(); materialHelper.BookMaterials(bookMaterials); break; case "3": Console.Clear(); materialHelper.ArticleMaterials(articleMaterials); break; case "4": infinity = false; break; default: Console.Clear(); continue; } } }