You have declared your function to return a List<Person>
but the catch block exits without returning anything
catch (Exception eX)
{
MessageBox.Show(eX.Message);
return null;
// or return an empty list if more appropriate
// return new List<Person>();
}
The compiler sees that you have coded a catch block meaning that you expect to handle an exception here. But when the catch block exits there should be a return value.
It is difficult to say what is the proper way to return in these situations. I personally prefer to return a null object and test for this in the calling code. (I avoid to return an eventually partially filled list declared at the start of the method)