Write ( Enter Name: ) ;. Name=Console.ReadLine () ;. Write ( Enter Surname: ) ;. Surname=Console.ReadLine () ;. Write ( Enter Otchestvo: ) ;. Otchestvo=Console.ReadLine () ;. Write ( Enter Adress: ) ;. Adress=Console.ReadLine () ;. Write ( Enter NameKlass: ) ;. NameKlass=Console.ReadLine () ;. Write ( Enter NameScholl: ) ;. NameScholl=Console.ReadLine () ;. spisok_chel. Add (cp) ;. ReadKey () ;. Clear () ;; 2 : ct=new CTeacher () ;. Write ( Enter Name: ) ;. Name=Console.ReadLine () ;. Write ( Enter Surname: ) ;. Surname=Console.ReadLine () ;. Write ( Enter Otchestvo: ) ;. Otchestvo=Console.ReadLine () ;. Write ( Enter Adress: raquo ;) ;. Adress=Console.ReadLine () ;. Write ( Enter NamePredmet: ) ;. NamePredmet=Console.ReadLine () ;. spisok_chel.Add (ct) ;. ReadKey () ;. Clear () ;; 3 : cas=new CAdvanceStudent () ;. Write ( Enter Name: ) ;. Name=Console.ReadLine () ;. Write ( Enter Surname: ) ;. Surname= Console.ReadLine () ;. Write ( Enter Otchestvo: ) ;. Otchestvo=Console.ReadLine () ;. Write ( Enter Adress: ) ;. Adress=Console.ReadLine () ;. Write ( Enter NameUniver: ) ;. NameUniver=Console.ReadLine () ;. Write ( Enter NomerStud: ) ;. NomerStud=Console.ReadLine () ;. Write ( Enter TemaDeklarazii: ) ;. TemaDeklarazii=Console.ReadLine () ;. spisok_chel.Add (cas) ;. ReadKey () ;. Clear () ;; 4 : cs=new CStudent () ;. Write ( Enter Name: ) ;. Name=Console.ReadLine () ;. Write ( Enter Surname: ) ;. Surname=Console.ReadLine () ;. Write ( Enter Otchestvo: ) ;. Otchestvo=Console.ReadLine () ;. Write ( Enter Adress: ) ;. Adress=Console.ReadLine () ;. Write ( Enter NameUniver: ) ;. NameUniver=Console.ReadLine () ;. Write ( Enter NomerStud: ) ;. NomerStud=Console.ReadLine () ;. spisok_chel.Add (cs) ;. ReadKey () ;. Clear () ;; 5 : cw=new CWorker () ;. Write ( Enter Name: ) ;. Name=Console.ReadLine () ;. Write ( Enter Surname: ) ;. Surname=Console.ReadLine () ;. Write ( Enter Otchestvo: raquo ;) ;. Otchestvo=Console.ReadLine () ;. Write ( Enter Adress: ) ;. Adress=Console.ReadLine () ;. Write ( Enter Special: ) ;. Special=Console. ReadLine () ;. spisok_chel.Add (cw) ;. ReadKey () ;. Clear () ;; 6 :( IPerson item in List.spisok_chel)
{.WriteLine(item.ToString());.WriteLine(laquo;*********************************************************raquo;);
}. ReadKey () ;. Clear () ;;
}
}
}
}
Результат виконання програми