Advertisement
Czempina

Untitled

Nov 5th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using StudentManager.Models;
  6.  
  7. namespace StudentManager.Operations
  8. {
  9.     public class ShowStudents
  10.     {
  11.         private StudentFileManager studentFileManager = new StudentFileManager();
  12.  
  13.         public void Show()
  14.         {
  15.             List<Student> students = studentFileManager.Load();
  16.  
  17.             int studentCount = students.Count();
  18.  
  19.  
  20.             for (int i = 0; i < studentCount; i++)
  21.             {
  22.                 string studentRow = $"{i}. Imię: {students[i].FirstName}\tNazwisko: { students[i].LastName}\tPesel: { students[i].Pesel}\tWiek: { students[i].Age}\n";
  23.  
  24.                 Console.WriteLine(studentRow);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement