public Student(Student s) { FirstName = s.FirstName; LastName = s.LastName; EmailS = s.EmailS; TelS = s.TelS; Sexe = s.Sexe; BornOn = s.BornOn; BornAt = s.BornAt; Photo = s.Photo; Matricule = $"{FirstName.Substring(0, 2)}{BornOn.Year.ToString().Substring(2)}" + $"{count++.ToString().PadLeft(4, '0')}{Sexe.Substring(0, 1)}"; }
public Etudiant(Etudiant e, Ecole s) : base(s.Name, s.Tel, s.Logo, s.Email) { FirstName = e.FirstName; LastName = e.LastName; EmailS = e.EmailS; TelS = e.TelS; Sexe = e.Sexe; BornOn = e.BornOn; BornAt = e.BornAt; Photo = e.Photo; Matricule = $"{FirstName.Substring(0, 2)}{BornOn.Year.ToString().Substring(2)}" + $"{count++.ToString().PadLeft(4, '0')}{Sexe.Substring(0, 1)}"; }