nerdexam
Microsoft

70-511 · Question #18

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You…

The correct answer is B. Write the following code segment in the button onclick event. See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath. You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. What should you do?

Options

  • AWrite the following code segment in the button onclick event.
  • BWrite the following code segment in the button onclick event.
  • CUse the following code segment from the PlaySound() Win32 API function and call the
  • DReference the Microsoft.DirectX Dynamic Link Libraries.

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    76% (34)
  • C
    13% (6)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice