欢迎来到PP题库网 PP题库官网
logo
全部科目 > 微软认证考试 > MCTS > MCTS(70-513)

单项选择题

You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service.(Line numbers are included for reference only.)
01 BasicHttpBinding myBinding = new BasicHttpBinding();
02 EndpointAddress myEndpointAddress = new EndpointAddress("http://contoso.com/TaxService.svc");
03 ...
04 ITaxService client = channelFactory.CreateChannel();
05 string data = client.GetData(1);
You need to consume the service.
Which code segment should you insert at line 03?()

    A. var channelFactory = new ChannelFactory();
    B. var channelFactory = new ChannelFactory(myBinding);
    C. var channelFactory = new ChannelFactory(myBinding, myEndpointAddress);
    D. var channelFactory = new ChannelFactory("http://contoso.com/TaxService.svc");

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题