[ClearCollection<T>] 活動設計工具會用來建立及設定 ClearCollection 活動。
ClearCollection<T> 活動
ClearCollection 活動會清除所有項目的指定集合。
使用 ClearCollection<T> 活動設計工具
[ClearCollection<T>] 活動設計工具位於 [工具箱] 的 [集合] 類別中,若要存取,請按一下 工作流程設計工具 的 [工具箱] 索引標籤 (也可以從 [檢視] 功能表選取 [工具列],或是按 CTRL+ALT+X)。
[ClearCollection<T>] 活動設計工具可以從 [工具箱] 拖曳出來,放到 工作流程設計工具 介面上通常用來放置活動的任一處,例如 Sequence 內部。 這會建立一個 ClearCollection 活動,具有 ClearCollection<Int32> 的預設 DisplayName (預設的 TypeArgument 是 Int32。 這可以在屬性方格中變更)。 DisplayName 值可以在 [ClearCollection<T>] 活動設計工具的標頭中編輯,或是在屬性方格的 [DisplayName] 方塊中編輯。 其他的屬性必須在屬性方格上進行編輯。
ClearCollection<T> 屬性
下表顯示 ClearCollection 屬性,並且描述屬性在設計工具中的使用方式。
| 屬性名稱 | 必要 | 使用方式 |
|---|---|---|
DisplayName |
False |
指定 AddToCollection 活動選用的易記名稱。 預設為 ClearCollection<Int32>。 雖然 DisplayName 值並非絕對必要,但建議您盡量使用。 |
True |
指定要清除項目的集合。 此集合屬於 ICollection<TypeArgument>. 型別。若要指定集合,請在屬性方格中輸入 Visual Basic 運算式。 |
|
TypeArgument |
True |
指定 ICollection 所包含項目的 T 型別。 根據預設,這個 TypeArgument 型別會設定為 Int32。 若要變更型別,請在屬性方格中,變更下拉式方塊中 TypeArgument 的值。 |
另請參閱
概念
AddToCollection<T> 活動設計工具
ExistsInCollection<T> 活動設計工具
RemoveFromCollection<T> 活動設計工具