private void SetAutoCompletionForTreatmentsNames() { var namesCollection = new AutoCompleteStringCollection(); namesCollection.AddRange(TreatmentManager.GetAllTreatments().Select(t => t.Name).ToArray()); SetAutoCompleteSourceForTextBox(txtTreatmentName, namesCollection); }