public static List <string> returnNamesGroupForMembers(int groupID) { string sql = $"SELECT PersonID FROM GroupsIn WHERE GroupID == {groupID}"; SQLiteCommand command = new SQLiteCommand(sql, GlobalVariables.connection); SQLiteDataReader reader = command.ExecuteReader(); List <int> peopleID = new List <int>(); while (reader.Read()) { peopleID.Add(int.Parse(reader["PersonID"].ToString())); } List <string> returnList = new List <string>(); foreach (int ID in peopleID) { returnList.Add($"{GlobalVariables.iDToEmail(ID)} ({GlobalVariables.iDToUsername(ID)})"); } return(returnList); }