TryCatch.Catches 屬性

定義

Catch 活動擲回例外狀況時,要檢查的 Try 項目集合。

public:
 property System::Collections::ObjectModel::Collection<System::Activities::Statements::Catch ^> ^ Catches { System::Collections::ObjectModel::Collection<System::Activities::Statements::Catch ^> ^ get(); };
[System.Windows.Markup.DependsOn("Try")]
public System.Collections.ObjectModel.Collection<System.Activities.Statements.Catch> Catches { get; }
[<System.Windows.Markup.DependsOn("Try")>]
member this.Catches : System.Collections.ObjectModel.Collection<System.Activities.Statements.Catch>
Public ReadOnly Property Catches As Collection(Of Catch)

屬性值

Catch 集合。

屬性

備註

Catch 的評估順序就是該屬性加入集合的順序。 如果找到例外狀況類型的完全相符專案,則會執行比 Catch 對活動。 如果找不到完全相符專案, Catch 則會執行最接近相符 ExceptionType 的 。

放在設計工具中之後, Catch 就無法在設計工具中重新排序活動。 若要重新排序活動的集合 Catch ,請以正確的順序刪除並重新新增活動,或使用工作流程的 XAML (程式代碼) 檢視。

適用於