public static void ConfirmAll(RFID_Device localDevice, List <string> tagsList) { int nbTagToConfirm = tagsList.Count; // initial number of tags localDevice.ConfirmList(tagsList, TagType.TT_R8); string message = String.Format("{0} tags to Confirm: {1} have been found.", nbTagToConfirm, nbTagToConfirm - tagsList.Count); if (tagsList.Count > 0) // some tag UIDs are still in the list : they've not been found { message += "\nMissing tags ID :" + tagsList.Count + "\r\n"; foreach (string missingTag in tagsList) { message = String.Format("{0}\n{1}", message, missingTag); } } MessageBox.Show(message); // while user doesn't close the dialog, the led-lighting thread is still running }