nerdexam
Microsoft

70-513 · Question #186

You are developing a client application that consumes a Windows Communication Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe…

The correct answer is D. Dim asyncResult As IAsyncResult = client.BeginGetFlight. See the full explanation below for the reasoning.

Question

You are developing a client application that consumes a Windows Communication Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns. You create an instance of the client proxy with the following code. Dim client As TravelServiceClient = New TravelServiceClient() You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?

Options

  • Aclient.BeginGetFlight(AddressOf
  • Bclient.GetFlight()
  • CAddHandler client.GetFlightCompleted,
  • DDim asyncResult As IAsyncResult = client.BeginGetFlight

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    8% (3)
  • C
    3% (1)
  • D
    85% (34)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice