what is wrong with the logic of my code? i need to find the oldest and youngest student. the end user has to enter the bday into a string
===

 DateTime young = DateTime.MinValue;
                         DateTime old = DateTime.MinValue;


                        foreach (var d in students)
                        {
                            try
                            {

                                DateTime dt = Convert.ToDateTime(d.dob);

                                
                                int result = DateTime.Compare(young, dt);

                                if (result < 0)
                                {
                                    old = dt;
                                }


                                if (result > 0)
                                {
                                    young = dt;
                                }

                            }
                            catch (Exception ex)
                            {
                                Console.WriteLine(ex.Message.ToString());
                            }
                            
                            }

                        Console.WriteLine("the youngest age is {0}",young);

                        Console.WriteLine("the oldest age is {0}", old);
There is something wrong with the logic and im unable to get the exact output! please do help!