NotifyCollectionChangedEventArgs Constructor (NotifyCollectionChangedAction, Object, Object, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a Replace change.

Namespace:  System.Collections.Specialized
Assembly:  System (in System.dll)

public NotifyCollectionChangedEventArgs(
	NotifyCollectionChangedAction action,
	Object newItem,
	Object oldItem,
	int index
)

Parameters

action
Type: System.Collections.Specialized.NotifyCollectionChangedAction
The action value, as a value of the enumeration. This should be Replace; see Remarks.
newItem
Type: System.Object
The new item that is replacing the original item.
oldItem
Type: System.Object
The original item that is replaced.
index
Type: System.Int32
The index of the item being replaced.

ExceptionCondition
NotSupportedException

action is not Replace.

After construction, NotifyCollectionChangedEventArgs properties are immutable. A Replace action should use this signature because it needs to specify the old and new items. Other actions should use the other signatures.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft