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

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

public Insert ( int index, string value ) : void
index int
value string
Результат void
        public void Insert(int index, string value) { }
        public void Remove(string value) { }

Usage Example

Пример #1
0
        /// <summary>
        /// Adds a string to the list and positions it in the recent list
        /// </summary>
        /// <param name="text">The string that should be added</param>
        public void AddString(string text)
        {
            if (m_List.Contains(text))
            {
                m_List.Remove(text);
                m_List.Insert(0, text);
            }
            else
            {
                if (m_List.Count == m_Capacity)
                {
                    m_List.RemoveAt(m_List.Count - 1);
                }

                m_List.Insert(0, text);
            }
        }
All Usage Examples Of System.Collections.Specialized.StringCollection::Insert