Which code segment should you use?

You create a Windows Workflow Foundation custom activity class named AccountTransfer by using Microsoft .NET Framework 3.5.

You plan to add a property named Amount of type double to the custom activity.

During the creation of a workflow, the property must be available to other activities for the following purposes:

Reading
Writing
Activity data binding
You need to ensure that the property meets the outlined requirements.

Which code segment should you use?

You create a Windows Workflow Foundation custom activity class named AccountTransfer by using Microsoft .NET Framework 3.5.

You plan to add a property named Amount of type double to the custom activity.

During the creation of a workflow, the property must be available to other activities for the following purposes:

Reading
Writing
Activity data binding
You need to ensure that the property meets the outlined requirements.

Which code segment should you use?

A.
[Bindable(true)] public double Amount { get { return _amount; } set { _amount = value; } }double _amount;

B.
[ExtenderProvidedProperty] public double Amount { get { return _amount; } set { _amount = value; } }double _amount;

C.
public static DependencyProperty AmountProperty = DependencyProperty.Register("Amount", typeof(double), typeof(AccountTransfer));public double Amount { get { return (double)GetValue(AmountProperty); } set { SetValue(AmountProperty, value); }}

D.
public static DependencyProperty AmountProperty = DependencyProperty.Register("Amount", typeof(double), typeof(AccountTransfer)); public ActivityBind Amount { get { return
this.GetBinding(AmountProperty); } set { return this.SetBinding(AmountProperty, value); }}



Leave a Reply 0

Your email address will not be published. Required fields are marked *