public Person[] GetUsers() { DataTable tbl = sql.Query("select * from user;"); Person[] people = new Person[tbl.Rows.Count]; for (int i = 0; i < tbl.Rows.Count; i++) { people[i] = new Person(tbl.Rows[i]); } return(people); }