XmlNodeChangedEventArgs 類別

定義

public ref class XmlNodeChangedEventArgs : EventArgs
public class XmlNodeChangedEventArgs : EventArgs
type XmlNodeChangedEventArgs = class
    inherit EventArgs
Public Class XmlNodeChangedEventArgs
Inherits EventArgs
繼承
XmlNodeChangedEventArgs

備註

下列C#程式碼顯示如何使用事件處理常式。The following C# code shows how to use the event handler.

//Add a new event handler.  
XmlDocument doc = new XmlDocument();  
doc.NodeInserted += new XmlNodeChangedEventHandler(NodeInsertedHandler);  
//Define the event handler.  
void NodeInsertedHandler(Object src, XmlNodeChangedEventArgs args)  
{  
 Console.WriteLine("Node " + args.Node.Name + " inserted!!");  
}  

注意

如果作業是由多個動作組成, 則會產生多個事件。If an operation is comprised of multiple actions, it results in multiple events. 例如, AppendChild呼叫可能必須移除從其先前父系附加的節點。For example, an AppendChild call may have to remove the node being appended from its previous parent. 在此情況下, 您會NodeRemoved看到事件, 接著NodeInserted是事件。In this case you will see a NodeRemoved event followed by a NodeInserted event.

建構函式

XmlNodeChangedEventArgs(XmlNode, XmlNode, XmlNode, String, String, XmlNodeChangedAction)

初始化 XmlNodeChangedEventArgs 類別的新執行個體。Initializes a new instance of the XmlNodeChangedEventArgs class.

屬性

Action

取得指出發生哪種類型之節點變更事件的值。Gets a value indicating what type of node change event is occurring.

NewParent

取得作業完成之後 ParentNode 的值。Gets the value of the ParentNode after the operation completes.

NewValue

取得節點的新值。Gets the new value of the node.

Node

取得要新增、移除或變更的 XmlNodeGets the XmlNode that is being added, removed or changed.

OldParent

取得作業開始之前 ParentNode 的值。Gets the value of the ParentNode before the operation began.

OldValue

取得節點的原始值。Gets the original value of the node.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱