using System.Collections.Generic;
private const string _loopBreak = "stop";
public static void Main()
Console.WriteLine("Podaj imiona uczniów:");
var studentNamesList = new List<string>();
var newStudentName = Console.ReadLine();
if(newStudentName.ToLower() == _loopBreak)
studentNamesList.Add(newStudentName);
foreach(var studentName in studentNamesList)
Console.WriteLine("Imiona uczniów to:");
Console.WriteLine(studentName);