public async void ReadMeasurementsFromSelectedCells() { // Get selected devices var list = ExtractSelectedCheckboxesFromDataGridView(_dgv); if (list.Count == 0) { MessageBox.Show("Select one or more devices first!"); return; } foreach (var item in list) { ConfigClass.UpdateWorkingDeviceAddress(item); Console.WriteLine("Sending to ID:" + item); // Wait await Task.Delay(1000); Console.WriteLine("ID:" + item + " finished"); } }