nerdexam
Microsoft

70-511 · Question #274

You have a method named Method1. Method1 accepts a string parameter named param1. Method1 performs a complex operation on param1. You load an array of strings to a variable named array 1. The array…

The correct answer is A. Array1.AsParalle1().ForAll(Me.Method1). See the full explanation below for the reasoning.

Question

You have a method named Method1. Method1 accepts a string parameter named param1. Method1 performs a complex operation on param1. You load an array of strings to a variable named array 1. The array contains 1,000 items. You need to ensure that other methods that call Method1 can use multiple processor cores when they execute. Which code segment should you use?

Options

  • AArray1.AsParalle1().ForAll(Me.Method1)
  • BFor Each item. As String In array1
  • CArray1.AsQueryable().AsParallel()
  • DArray1.AsQueryable.All (Me.Method1)

How the community answered

(40 responses)
  • A
    78% (31)
  • B
    13% (5)
  • C
    3% (1)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice