Hello. I have this problem which I really cannot understand. I am getting info from a WebClient which misbehaves and returns an empty response. This is another issue which I hope to solve soon, but the real problem is the following.
Here is my code:
private void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) {
if (e.Error != null) {
//...
}
Stream stm;
try {
stm = e.Result;
}
catch (Exception ex) {
// debug output
return;
}
WebClient senderWC = (WebClient)sender;
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(MapData));
What I get is an exception at the try block. That is, the debugger stops with the arrow pointing to the try line, and highlights the opening braces. Why is that?
See shot: