Mvp.Xml.Common.XPath.XPathNavigatorIterator.RemoveAt C# (CSharp) Метод

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

Removes the list item at the specified index.
public RemoveAt ( int index ) : void
index int The zero-based index of the item to remove.
Результат void
        public void RemoveAt(int index)
        {
            _navigators.RemoveAt(index);
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Implements the following function 
        ///    node-set difference(node-set, node-set) 
        /// </summary>
        /// <param name="nodeset1">An input nodeset</param>
        /// <param name="nodeset2">Another input nodeset</param>
        /// <returns>The those nodes that are in the node set 
        /// passed as the first argument that are not in the node set 
        /// passed as the second argument.</returns>
        public XPathNodeIterator difference(XPathNodeIterator nodeset1, XPathNodeIterator nodeset2)
        {
            if (nodeset2.Count > 166)
                return difference2(nodeset1, nodeset2);            
            //else
            XPathNavigatorIterator nodelist1 = new XPathNavigatorIterator(nodeset1, true);
            XPathNavigatorIterator nodelist2 = new XPathNavigatorIterator(nodeset2);            

            for (int i = 0; i < nodelist1.Count; i++)
            {
                XPathNavigator nav = nodelist1[i];

                if (nodelist2.Contains(nav))
                {
                    nodelist1.RemoveAt(i);
                    i--;
                }
            }

            nodelist1.Reset();
            return nodelist1;
        }
All Usage Examples Of Mvp.Xml.Common.XPath.XPathNavigatorIterator::RemoveAt