DRAG DROP
You are developing an application that will include a method named GetDat
a. The GetData() method will retrieve several lines of data from a web service by using a
System.IO.StreamReader object.
You have the following requirements:
The GetData() method must return a string value that contains the entire response from the web
service.
The application must remain responsive while the GetData() method runs.
You need to implement the GetData() method.
How should you complete the relevant code? (To answer, drag the appropriate objects to the
correct locations in the answer area. Each object may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.)
How should you complete the relevant code?
DRAG DROP
You are developing an application that will include a method named GetDat
a. The GetData() method will retrieve several lines of data from a web service by using a
System.IO.StreamReader object.
You have the following requirements:
The GetData() method must return a string value that contains the entire response from the web
service.
The application must remain responsive while the GetData() method runs.
You need to implement the GetData() method.
How should you complete the relevant code? (To answer, drag the appropriate objects to the
correct locations in the answer area. Each object may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.)
4,3,2
await await, wtf?
right missing something, but await is used
https://msdn.microsoft.com/en-us/library/system.io.streamreader.readtoendasync(v=vs.110).aspx
static async void ReadCharacters()
{
String result;
using (StreamReader reader = File.OpenText(“existingfile.txt”))
{
Console.WriteLine(“Opened file.”);
result = await reader.ReadToEndAsync();
Console.WriteLine(“Contains: ” + result);
}
}
So, await await is wrong?
Is it possible to not put anything in that box in the exam? To leave it empty?
Reads all characters from the current position to the end of the stream asynchronously and returns them as one string.
await await makes me confused. (@-0)
https://stackoverflow.com/questions/34816628/await-await-vs-unwrap