System.Collections.Specialized.StringCollection.Clear C# (CSharp) Метод

Clear() публичный Метод

public Clear ( ) : void
Результат void
        public void Clear() { }
        public bool Contains(string value) { throw null; }

Usage Example

Пример #1
0
        private void updatecombo(ComboBox cb,
                                 System.Collections.Specialized.StringCollection strs,
                                 string t)
        {
            if (cb.Items.IndexOf(t) != 0)
            {
                // should save selection and cursor position here
                int ss = cb.SelectionStart;
                int sl = cb.SelectionLength;

                cb.Items.Remove(t);
                cb.Items.Insert(0, t);
                cb.Select(ss, sl);

                strs.Clear();

                foreach (string i in cb.Items)
                {
                    strs.Add(i);
                }

                Properties.Settings.Default.Save();
            }

            if (!cb.Text.Equals(t))
            {
                cb.Text = t;
            }
        }
All Usage Examples Of System.Collections.Specialized.StringCollection::Clear