private void Execute(ISender client, GetWebcamDevices message) { ArrayList webcamDevices = _webcamHelper.GetDevices(); var deviceList = new List <Tuple <int, string> >(); for (int i = 0; i < webcamDevices.Count; i++) { deviceList.Add(Tuple.Create(i, webcamDevices[i].ToString())); } client.Send(new GetWebcamDevicesResponse { WebcamDevices = deviceList }); }