UiPath Automation Developer Professional v1 — Question 85
Which of the following demonstrates the correct syntax for using the Vb.Net "If" Operator?
Answer options
- A. If(condition1, valueIfTrue) ElseIf(valueIfFalse)
- B. valueIfTrue If condition1 Else valueIfFalse
- C. If condition1 Then valueIfTrue Elself valueIfFalse
- D. If(condition1, valueIfTrue, valueIfFalse)
Correct answer: D
Explanation
Option D is correct as it uses the proper format for the Vb.Net 'If' Operator, which requires three parameters: the condition, the value if true, and the value if false. Options A and B incorrectly structure the syntax, while option C has a typographical error with 'Elself' instead of 'Else'.