Flowchart.Variables プロパティ

定義

フローチャートに含まれる子アクティビティ間で状態を共有するために使用できる、Flowchartに関連付けられているVariable オブジェクトのコレクションを取得または設定します。

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

プロパティ値

変数のコレクション。

次のコード サンプルは、 Flowchart アクティビティでの変数の使用を示しています。 この例は、 TryCatch を使用したフローチャート アクティビティのエラー処理 のサンプルです。

Flowchart flowChart = new Flowchart
{
    DisplayName = "Promotional Discount Calculation",
    Variables = {discount, promo, numberOfKids},
    StartNode = promoCodeSwitch,
    Nodes =
    {
        promoCodeSwitch,
        singleStep,
        mnkStep,
        mwkStep,
        discountDefault,
        flowDecision,
        discountApplied,
        discountNotApplied
    }
};

適用対象