ARCed.Scripting.AutoCompleteForm.removeSelectedToolStripMenuItem_Click C# (CSharp) Method

removeSelectedToolStripMenuItem_Click() private method

private removeSelectedToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void removeSelectedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.listBoxWords.BeginUpdate();
            var words = new string[this.listBoxWords.SelectedItems.Count];
            for (int i = 0; i < this.listBoxWords.SelectedItems.Count; i++)
                words[i] = this.listBoxWords.SelectedItems[i].ToString();
            foreach (string word in words)
                this._wordList.Remove(word);
            this.listBoxWords.EndUpdate();
        }