✅ Input into list (Console app)

Program

I want the user to keep creating accounts, and then put them inside at list
Example of what the student requires
Student Alex = new Student(1, "Mike", "Scmith", new DateTime(1971, 2, 23), 0);

            Enrollment x = new();
            x.Enrollments = new List<Enrollment>()
            {
            };

            Console.WriteLine("Write students ID:");
            Alex.StudentId = Console.ReadLine();
            Console.WriteLine("Write FirstName");
            Alex.FirstName Console.ReadLine();
            Console.WriteLine("Write LastName");
            Alex.LastName Console.ReadLine();
            Console.WriteLine("Write BirthDate");
            Alex.StudentId Console.ReadLine();

Studen Class
    public class Student : PersonalInformation
    {
        public Student(int studentId, string firstName, string lastName, DateTime dateoftime, int age) : base(firstName, lastName, age)
        {
            StudentId = studentId;
        }


        public int StudentId
        {
            get;
            set;
        }

I am just not sure how to make an entire new object containing the given information, what should I do?
Was this page helpful?