Share via


FlowSwitch<T> Constructeur

Définition

Crée une instance de la classe FlowSwitch<T>.

public:
 FlowSwitch();
public FlowSwitch ();
Public Sub New ()

Exemples

L'exemple de code suivant montre comment créer un nœud FlowSwitch<T>. Cet exemple provient de l’exemple Gestion des erreurs dans une activité d’organigramme à l’aide de TryCatch .

FlowSwitch<string> promoCodeSwitch = new FlowSwitch<string>
{
    Expression = promo,
    Cases =
    {
       { "Single", singleStep },
       { "MNK", mnkStep },
       { "MWK", mwkStep }
    },
    Default = discountDefault
};

S’applique à