1.The method ToArray() returns an array of
Student
objects;
2.If you need an array of integer with the ID of the students, you have to iterate your first list and create a list of IDs, then to use ToArray() on this 2nd list, like in example bellow:
List<student> studIDList = handler.GetStudentIDList();
List<int> idList= new List<int>;
foreach(student item in studIDList)
{
idList.Add(item.ID);
}
int[] studID = idList.ToArray();