System.ComponentModel.CollectionChangeEventArgs Class

Assembly: System.dll
Namespace: System.ComponentModel
Summary
Provides data for the DataColumnCollection.CollectionChanged event.
C# Syntax:
public class CollectionChangeEventArgs : EventArgs
Remarks
A DataColumnCollection.CollectionChanged event is raised when you change which items are in a collection, for example, by adding an element to a collection or removing an element from the collection. This event is not raised when an individual element changes its value.
Example
For an example on using the CollectionChangeEventArgs class, see the sample code in the DataColumnCollection.CollectionChanged event of the DataColumnCollection class.
See also:
System.ComponentModel Namespace | CollectionChangeEventHandler | CollectionChangeAction

System.ComponentModel.CollectionChangeEventArgs Member List:

Public Constructors
ctor #1 Initializes a new instance of the CollectionChangeEventArgs class.
Public Properties
Action Read-only

Gets an action that specifies how the collection changed.
Element Read-only

Gets the instance of the collection with the change.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.ComponentModel.CollectionChangeEventArgs Member Details

ctor #1
Summary
Initializes a new instance of the CollectionChangeEventArgs class.
C# Syntax:
public CollectionChangeEventArgs(
   CollectionChangeAction action,
   object element
);
Parameters:

action

One of the CollectionChangeAction values that specifies how the collection changed. One of the CollectionChangeAction values that specifies how the collection changed.

element

An Object that specifies the instance of the collection where the change occurred.

See also:
CollectionChangeAction

Return to top


Property: Action (read-only)
Summary
Gets an action that specifies how the collection changed.
C# Syntax:
public virtual CollectionChangeAction Action {get;}
Remarks
This property can have one of the following values:

Action Property Value
An element was added to the collection CollectionChangeAction.Add
An element was removed from the collection CollectionChangeAction.Remove
The collection was completely changed CollectionChangeAction.Refresh
See also:
CollectionChangeAction

Return to top


Property: Element (read-only)
Summary
Gets the instance of the collection with the change.
C# Syntax:
public virtual object Element {get;}
See also:
CollectionChangeAction

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~CollectionChangeEventArgs();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.