exam questions

Exam 70-357 All Questions

View all questions & answers for the 70-357 exam

Exam 70-357 topic 1 question 36 discussion

Actual exam question from Microsoft's 70-357
Question #: 36
Topic #: 1
[All 70-357 Questions]

You are developing a Universal Windows Platform (UWP) app. The app must allow the user to select only one file at a time.
You need to ensure that the app displays the appropriate dialog window.
Which method should you use?

  • A. FileOpenPicker.PickSingleFileAsync()
  • B. FileOpenPicker.PickMultipleFilesAsync()
  • C. StorageItem.OpenSequentialReadAsync()
  • D. StorageItem.GetFileFromPathAsync()
  • E. StorageItem.OpenReadAsync()
Show Suggested Answer Hide Answer
Suggested Answer: Explanation 🗳️
To pick a single file.
Windows.Storage.StorageFile file = await picker.PickSingleFileAsync(); if (file != null)
// Application now has read/write access to the picked file
this.textBlock.Text = "Picked photo: " + file.Name;
else
this.textBlock.Text = "Operation cancelled.";
Reference: https://docs.microsoft.com/en-us/windows/uwp/files/quickstart-using-file-and-folder-pickers#pick-a-single-file-complete-code-listing

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dsvirdi
Highly Voted 5 years, 4 months ago
Answer A
upvoted 9 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...