TryCatch.Catches Property


The collection of Catch elements to be checked when the Try activity throws an exception.

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

Property Value

The catch collection.



Catches are evaluated in the order in which they are added to the collection. If an exact match for the exception type is found, the matching Catch activity is executed. If no exact match is found, the Catch with the closest matching ExceptionType is executed.

Once placed in the designer, Catch activities cannot be reordered in the designer. To reorder the collection of Catch activities, either delete and re-add them in the correct order, or use the XAML (code) view for the workflow.

Applies to