jabber.connection.ItemList.RemoveAt C# (CSharp) Method

RemoveAt() public method

Makes sure that the underlying ID index is in sync when an item is removed.
public RemoveAt ( int index ) : void
index int Index of PubSubItem to remove.
return void
        public override void RemoveAt(int index)
        {
            PubSubItem item = (PubSubItem)this[index];
            string id = item.GetAttribute("id");
            if (id != "")
            {
                m_index.Remove(id);
            }
            base.RemoveAt(index);
            m_node.ItemRemoved(item);

            // renumber
            for (int i=index; i<Count; i++)
            {
                item = (PubSubItem)this[i];
                id = item.ID;
                if (id != "")
                    m_index[id] = i;
            }
        }