NFe.Components.XMLIniFile.DeleteValue C# (CSharp) Method

DeleteValue() public method

public DeleteValue ( string Path, string ValueSection ) : void
Path string
ValueSection string
return void
		public void DeleteValue(string Path, string ValueSection)   //ok
		{
			XmlNode n = GetPathNode(Path, false);
			if (n != null)
			{
				//MessageBox.Show(Path+"\n\r"+ValueSection);
				if (n.Attributes != null && n.Attributes.GetNamedItem( ValueSection )!=null)
				{
					n.Attributes.RemoveNamedItem(ValueSection);
                    this.Modified = true;
					return;
				}
				for(int i = 0; i < n.ChildNodes.Count; ++i)
					if (n.ChildNodes[i].LocalName == ValueSection)
					{
						XmlNode d = n.ChildNodes[i];
                        n.RemoveChild(d);
                        this.Modified = true;
						return;
					}
			}
		}