ActivityCollection.Item[] Property

Definition

Gets an item Activity in the ICollection by name or index.

Overloads

Item[String]

Gets the activity in the ICollection based on the string which is a unique key.

Item[Int32]

Gets or sets the activity in the ICollection based on the index.

Item[String]

Gets the activity in the ICollection based on the string which is a unique key.

C#
public System.Workflow.ComponentModel.Activity this[string key] { get; }

Parameters

key
String

Unique identifier for activity in the ICollection.

Property Value

A member Activity of the ICollection; the key in the ICollection which was specified in the call.

Remarks

If there is no Activity in the ICollection with specified key, an exception is raised.

Applies to

.NET Framework 4.8.1 和其他版本
產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Item[Int32]

Gets or sets the activity in the ICollection based on the index.

C#
public System.Workflow.ComponentModel.Activity this[int index] { get; set; }

Parameters

index
Int32

Zero-based index into the ICollection.

Property Value

A member activity of the ICollection, whose index in the ICollection was specified in the call.

Implements

Exceptions

index is not a valid index in IList.

The property is set and the IList is read-only.

An attempt to set to an Object that is not an Activity.

Applies to

.NET Framework 4.8.1 和其他版本
產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1