private void InitAutoComplete() { var source = new AutoCompleteStringCollection(); source.AddRange(ScanDataBaseManager.GetSearchHistory().Select(x => x.Content).ToArray()); textBox1.AutoCompleteCustomSource = source; textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource; }