I am trying to call a web service and return the results in an ArrayList. I'm petty much at a standstill with a casting issue. Here is the function that call the webservice and the error.

Using Windows CE

public ArrayList GetTicketsForOffline() { WebService.TicketVO wsTicket = new WebService.TicketVO(); WebService.TicketService service = new WebService.TicketService(); ArrayList arrTicketResult = new ArrayList(); ArrayList arrTickets = new ArrayList(service.GetTicketsForOffline().ToList()); for (int i = 0; i <= (arrTickets.Count - 1); i++) { TicketVO ticket = new TicketVO(); wsTicket = (WebService.TicketVO)arrTickets[i];<--System.InvalidCastException: InvalidCastException ticket.EventID = wsTicket.EventID; ticket.IPAddress = wsTicket.IPAddress; ticket.OrderID = wsTicket.OrderID; ticket.SaleDate = wsTicket.SaleDate; ticket.ScanDate = wsTicket.ScanDate; ticket.StatusID = wsTicket.StatusID; ticket.TicketID = wsTicket.TicketID; ticket.TypeID = wsTicket.TypeID; arrTicketResult.Add(ticket); } return arrTicketResult; }