最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 编程开发 > asp教程

ASP一个很有用的WCF调用编程技巧

日期:08-13    来源:中国设计秀    作者:cnwebshow.com

并调用相应的方法(这里的方法与服务契约方法一致)即可,所有关于服务调用的细节均被封装在服务代理中。4IL中国设计秀
4IL中国设计秀
   1: using System;   2: using Artech.Lib;   3: using Artech.WcfServices.Contracts;   4: namespace Artech.WcfServices.Clients   5: {   6:     class Program   7:     {   8:         static void Main(string[] args)   9:         {  10:             CalculatorProxy calculatorProxy = new CalculatorProxy();  11:             int result = calculatorProxy.Add(1, 2);  12:             Console.WriteLine("x + y = {2} when x = {0} and y = {1}", 1, 2, result);  13:             Console.Read();  14:         }  15:     }  16: }4IL中国设计秀
四、局限4IL中国设计秀
4IL中国设计秀
这个解决方案有一个很大的局限:服务方式不能包含ref和out参数,因为这两种类型的参数不能作为匿名方法的参数。4IL中国设计秀

本文引用地址:/bc/article_46168.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明