PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a Windows Workflow Foundation custom activity by using Microsoft .NET Framework 3.5.

The custom activity contains a property named ApproveDocument of type Boolean.

The property must meet the following requirements:

The custom activity can read values from the property during the workflow design. The custom activity can write values into the property during the workflow design.
The value of the property does not change at runtime.
You need to implement the ApproveDocument property to meet the outlined requirements.

Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
public bool ApproveDocument{ get { return _approveDocument; }}readonly bool _approveDocument = true;

B.
public bool ApproveDocument{ get { return _approveDocument; } set { if (!IsBindingSet) { _approveDocument = value; } }}bool _approveDocument;

C.
public static DependencyProperty ApproveDocumentProperty = DependencyProperty.Register("ApproveDocument", typeof(bool), typeof(DocumentUploadActivity), new PropertyMetadata(DependencyPropertyOptions.Metadata));public bool ApproveDocument { get { return (bool)base.GetValue(ApproveDocumentProperty); } set { base.SetValue(ApproveDocumentProperty, value);
}}

D.
public static DependencyProperty ApproveDocumentProperty = DependencyProperty.Register("ApproveDocument", typeof(bool), typeof(DocumentUploadActivity), new PropertyMetadata(DependencyPropertyOptions.ReadOnly));public bool ApproveDocument { get { return (bool)base.GetValue(ApproveDocumentProperty); } set { base.SetValue(ApproveDocumentProperty, value); }}


Leave a Reply