You create a Microsoft Office InfoPath workflow task form for users. The form contains all the details of each task. You need to store the value of the Comments field in a variable named UserInput when each user submits the form. Which code segment should you use?
A.
String UserInput = new String();
SPWorkflowTaskProperties wpTProps =
new SPWorkflowTaskProperties();
…
UserInput = wpTProps.ExtendedProperties[“Comments”].ToString();
B.
SPWorkflowActivationProperties wpAProps =
new SPWorkflowActivationProperties();
…
object UserInput = wpAProps.Item.Fields[“Comments”];
C.
SPWorkflowActivationProperties wpAProps =
new SPWorkflowActivationProperties();
XmlSerializer serializer = new XMLSerializer(typeof(MyFields));
xmlTextReader reader = new XMLTextReader
(new System.IO.StringReader(wpAProps.InitiationData));
MyFields fields = serializer.Deserialize(reader);
String UserInput = fields.Users[i].Comments;
D.
XmlSerializer serializer = new XmlSerializer(typeof(InitForm));
XmlTextReader reader = new XmlTextReader
(new System.IO.StringReader(workflowProps.InitiationData));
InitForm initform = (InitForm) serializer.Deserialize(reader);
String UserInput = initform.comments;