static void Main() { var student = new List <Student> { new Student("Ivan", "Ivanov", 18, 1, "021234", "", new List <int> { 5, 3, 5, 6 }, 1), new Student("Pesho", "Peshev", 18, 2, "+3592321638", "*****@*****.**", new List <int> { 5, 2, 5, 6 }, 1), new Student("Petko", "Petkov", 19, 3, "07113", "*****@*****.**", new List <int> { 5, 2, 5, 6 }, 2), new Student("Goshko", "Goskov", 19, 4, "083545", "*****@*****.**", new List <int> { 5, 2, 2, 5 }, 2), new Student("Mariika", "Marieva", 20, 5, "+359 2 554135435", "*****@*****.**", new List <int> { 6, 2, 6, 4 }, 1), new Student("Rositza", "Roseva", 21, 6, "112345", "*****@*****.**", new List <int> { 4, 2, 2, 3 }, 2), new Student("Ivan", "Petkov", 36, 7, "524354", "*****@*****.**", new List <int> { 6, 2, 6, 6 }, 3), }; var countThem = student.ExtentionCount(); foreach (var st in countThem) { Console.WriteLine("{0} {1} {2}", st.FirstName, st.LastName, string.Join(" ", st.Marks)); } }
static void Main() { var student = new List<Student> { new Student("Ivan", "Ivanov",18,1,"021234","",new List<int> {5, 3, 5, 6},1), new Student("Pesho", "Peshev",18,2,"+3592321638","*****@*****.**",new List<int> {5, 2, 5, 6},1), new Student("Petko", "Petkov",19,3,"07113","*****@*****.**",new List<int> {5, 2, 5, 6},2), new Student("Goshko", "Goskov",19,4,"083545","*****@*****.**",new List<int> {5, 2, 2, 5},2), new Student("Mariika", "Marieva",20,5,"+359 2 554135435","*****@*****.**",new List<int> {6, 2, 6, 4},1), new Student("Rositza", "Roseva",21,6,"112345","*****@*****.**",new List<int> {4, 2, 2, 3},2), new Student("Ivan", "Petkov",36,7,"524354","*****@*****.**",new List<int> {6, 2, 6, 6},3), }; var countThem = student.ExtentionCount(); foreach (var st in countThem) { Console.WriteLine("{0} {1} {2}",st.FirstName, st.LastName, string.Join(" ",st.Marks)); } }
static void Main() { var students = new List<Student> { new Student("Dimitar", "Dimitrov",20,1,"0897777777","*****@*****.**",new List<int> {5, 3, 4, 6},2), new Student("Georgi", "Ivanov",22,2,"0897553344","*****@*****.**",new List<int> {5, 4, 5, 6},1), new Student("Ivan", "Georgiev",20,3,"0888664425","ivanov@@g,ail.com",new List<int> {6, 6, 5, 6},1), new Student("Dimitrinka", "Ivanova",22,4,"02-12356","*****@*****.**",new List<int> {5, 5, 5, 5},2), new Student("Katya", "Georgieva",18,5,"03022221","*****@*****.**",new List<int> {4, 5, 6, 4},1), new Student("Mishael", "Tonchev",18,6,"0878919299","*****@*****.**",new List<int> {4, 2, 2, 6},2), }; var countThem = students.ExtentionCount(); foreach (var st in countThem) { Console.WriteLine("{0} {1} {2}", st.FirstName, st.LastName, string.Join(" ", st.Marks)); } }