RemoveAt() public method

public RemoveAt ( int i ) : XmlAttribute
i int
return XmlAttribute
Esempio n. 1
0
 // Removes the attribute node with the specified index from the attribute collection.
 public virtual XmlNode RemoveAttributeAt(int i)
 {
     if (HasAttributes)
     {
         return(_attributes.RemoveAt(i));
     }
     return(null);
 }
Esempio n. 2
0
 // Remove a specified attribute by index.
 public virtual XmlNode RemoveAttributeAt(int i)
 {
     if (attributes != null)
     {
         return(attributes.RemoveAt(i));
     }
     else
     {
         return(null);
     }
 }
Esempio n. 3
0
        static void SortXmlAttributeCollection( XmlAttributeCollection col )
        {
            // Remove, sort, then re-add the attributes to the collection.
            if (sort_attr && col != null && col.Count > 0) {
                List<XmlAttribute> attrs = new List<XmlAttribute>(col.Count);

                for (int i = col.Count - 1; i >= 0; i--) {
                    attrs.Add(col[i]);
                    col.RemoveAt(i);
                }

                SortAttributeList(attrs);

                for (int i = 0; i < attrs.Count; i++) {
                    col.Append(attrs[i]);
                }
            }
        }