WP7,将服务引用添加到Visual Studio 2010后如何使用服务引用 [英] WP7, How to use a service reference after adding it to Visual Studio 2010

查看:63
本文介绍了WP7,将服务引用添加到Visual Studio 2010后如何使用服务引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照以下示例连接到Bing Maps地理编码服务:

I'm following this example for connecting to the Bing Maps geocode service:

http://blogs.msdn.com/b/dragoman/archive/2010/10/07/wp7-code-reverse-geocoding-with-the-bing-maps-service.aspx

大约在页面的中间,它说明了如何在Visual Studio 2010中添加服务引用,这是我能够成功完成的.然后它说要添加"using GeoCode.GeoCodeService",但是当我这样做时,我收到一条错误消息,提示找不到类型或名称空间'GeoCode'"

About half way down the page, it explains how to add a service reference in Visual Studio 2010, which I was able to do successfully. Then it says to add "using GeoCode.GeoCodeService", but when I do, I get an error saying "The type or namespace 'GeoCode' could not be found"

我做错什么了吗?步骤非常简单,没有任何错误.要访问该服务,我还需要做什么?

Am I doing something wrong. The steps are pretty simple and nothing gave an error. What else do I need to do in order to access the service?

推荐答案

添加服务引用后,您为其指定了一个类名.在解决方案资源管理器中查看一下它的名称,然后必须实例化该类才能使用该服务.

When you added the service reference, you gave it a class name. Have a look in your solution explorer to see what you called it, and then you have to instantiate that class to use the service.

这篇关于WP7,将服务引用添加到Visual Studio 2010后如何使用服务引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆