public static int[] getOfferRequestsToAnswerIDs(string username) { aUser requestsHolder = getUser(username); if (requestsHolder == null) { return(null); } OfferRequest[] requests = requestsHolder.getRequestsToAnswer().ToArray <OfferRequest>(); int[] requestsIDs = new int[requests.Count()]; for (int i = 0; i < requestsIDs.Length; i++) { requestsIDs[i] = requests[i].id; } return(requestsIDs); }