Version

Remove Method (ActivitiesCollection)

Removes the specified Activity from the collection.
Syntax
'Declaration
 
Public Sub Remove( _
   ByVal activity As Activity _
) 
public void Remove( 
   Activity activity
)

Parameters

activity
The Activity instance to remove from this collection.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThrown when the activity specified to be removed from the ActivitiesCollection is null (Nothing in Visual Basic .NET). The caller must provide a non-null Activity instance that is a member of the collection for it to be removed.
Remarks

Developers would use Remove to remove an Activity (or any class extending Activity) from the ActivitiesCollection when they hold a reference to the object. If the application instead has the index, within this ActivitiesCollection, or the Activity then it should use RemoveAt.

Removing an Activity from the ActivitiesCollection does not cause the Activity to be removed from any persistence store (such as the database). The Activity will reappear on the next page request unless the caller also removes it from the persistence store (i.e., database).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also