You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You add a custom activity class named PriorityParallelActivity to the application.
The custom activity defines the following features:
An attached dependency property named Priority
The standard static accessors for the Priority property
The Priority property is of type Int32.
You are creating a new workflow definition. The PriorityParallelActivity activity contains a CodeActivity activity named codeActivity1.
You need to set the value of the Priority property of the codeActivity1 activity to 5.
Which code segment should you use?
A.
codeActivity1.UserData["Priority"] = 5;
B.
codeActivity1.SetValue( (DependencyProperty)sender, 5);
C.
PriorityParalellActivity.SetPriority( codeActivity1, 5);
D.
PriorityParalellActivity.SetPriority( (DependencyObject)sender, 5);