Redigera

Dela via


TryCatch.Catches Property

Definition

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

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)

Property Value

The catch collection.

Attributes

Remarks

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