Version

RemoveAt Method (ActivitiesCollection)

Removes the Activity at the specified index from the collection.
Syntax
'Declaration
 
Public Shadows Sub RemoveAt( _
   ByVal index As Integer _
) 
public new void RemoveAt( 
   int index
)

Parameters

index
Index of the Activity in the collection to remove (zero-based).
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionThrown when the index specified exceeds the bounds of the ActivitiesCollection. For example, when RemoveAt(7) is called, and there are only four activities in the collection at indexes 0 through 3, then that would cause an ArgumentOutOfRangeException to be thrown.
Remarks

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

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