70-504  Exam

Exam # of questions Description  Update
70-504 180 MS.NET Framework 3.5 Workflow Foundation Applicati... 02/15/2011
[Practice Test]   [Download Study Guide(PDF)]  [Update Exam]

70-504 - Exam Information
  • Description:MS.NET Framework 3.5 Workflow Foundation Application Developer
  • Passing Score:0%
  • Practice Test - Number of questions:180 questions
  • Simulation Test - Number of questions:180 questions
  • Simulation Test Duration:120 minutes
  • Has explanations:No

Question of the day

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You plan to create a RuleSet class named ruleSet. You write the following code segment in the RuleSet class. Dim age As Int32 Dim adult As Boolean You write the following code segment. (Line numbers are included for reference only.) 01 Dim ruleSet As New RuleSet() 02 Dim ageRule As New Rule("AgeRule") 03 Dim thisRef As New CodeThisReferenceExpression() 04 05 Dim ageValueTest As New CodeBinaryOperatorExpression() 06 ageValueTest.Left = ageRef 07 ageValueTest.[Operator] = _ 08 CodeBinaryOperatorType.GreaterThanOrEqual 09 ageValueTest.Right = New CodePrimitiveExpression(18) 10 ageRule.Condition = New RuleExpressionCondition(ageValueTest) 11 Dim ageRuleAction As New CodeAssignStatement(adultValueRef, _ 12 New CodePrimitiveExpression(True)) 13 ageRule.ThenActions.Add(New _ 14 RuleStatementAction(ageRuleAction)) 15 ruleSet.Rules.Add(ageRule) You need to add a rule that sets the value of the adult field to true if the value of the age field is greater than or equal to 18. You also need to assign the highest priority to this rule. Which code segment should you insert at line 04?

Answer(s)

  1. Dim ageRef As New CodePropertyReferenceExpression(thisRef, "age")Dim adultValueRef AsNewCodePropertyReferenceExpression(thisRef, _ "adult")ageRule.Priority = Int32.MaxValue
  2. Dim ageRef As New CodeFieldReferenceExpression(thisRef, "age")Dim adultValueRef AsNew
  3. _ "adult")ageRule.Priority = Int32.MaxValueC. Dim ageRef As New CodeFieldReferenceExpression(thisRef, "age")Dim adultValueRef AsNewCodeFieldReferenceExpression(thisRef, _ "adult")ageRule.Priority = 0
  4. Dim ageRef As New CodePropertyReferenceExpression(thisRef, "age")Dim adultValueRef AsNewCodePropertyReferenceExpression(thisRef, _ "adult")ageRule.Priority = Int32.MinValue
Correct Answer

Dim ageRef As New CodeFieldReferenceExpression(thisRef, "age")Dim adultValueRef AsNew