System.Xml.DocumentXPathNavigator.DeleteAttribute C# (CSharp) Méthode

DeleteAttribute() private static méthode

private static DeleteAttribute ( XmlAttribute attribute, int index ) : void
attribute XmlAttribute
index int
Résultat void
        private static void DeleteAttribute(XmlAttribute attribute, int index) {
            XmlAttributeCollection attributes;

            if (!CheckAttributePosition(attribute, out attributes, index)
                && !ResetAttributePosition(attribute, attributes, out index)) {
                throw new InvalidOperationException(Res.GetString(Res.Xpn_MissingParent));
            }
            if (attribute.IsReadOnly) {
                throw new InvalidOperationException(Res.GetString(Res.Xdom_Node_Modify_ReadOnly)); 
            }
            attributes.RemoveAt(index);
        }