基于c#的汇率接口调用代码实例

基于c#的汇率接口调用代码实例

ID:33495727

大小:199.50 KB

页数:6页

时间:2019-02-26

基于c#的汇率接口调用代码实例_第1页
基于c#的汇率接口调用代码实例_第2页
基于c#的汇率接口调用代码实例_第3页
基于c#的汇率接口调用代码实例_第4页
基于c#的汇率接口调用代码实例_第5页
资源描述:

《基于c#的汇率接口调用代码实例》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、基于C#的汇率接口调用代码实例代码描述:基于C#的汇率接口调用代码实例代码平台:聚合数据usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Net;usingSystem.IO;usingXfrog.Net;usingSystem.Diagnostics;usingSystem.Web; //----------------------------------//汇率调用示例代码-聚合数据//在线接口文档:http://www.juhe

2、.cn/docs/80//代码中JsonObject类下载地址:http://download.csdn.net/download/gcm3206021155665/7458439//---------------------------------- namespaceConsoleAPI{    classProgram    {        staticvoidMain(string[]args)        {            stringappkey="*******************";//配置您申请的appkey          

3、                //1.常用汇率查询            stringurl1="http://op.juhe.cn/onebox/exchange/query";             varparameters1=newDictionary();             parameters1.Add("key",appkey);//你申请的key             stringresult1=sendPost(url1,parameters1,"get");             JsonObjec

4、tnewObj1=newJsonObject(result1);            StringerrorCode1=newObj1["error_code"].Value;             if(errorCode1=="0")            {                Debug.WriteLine("成功");                Debug.WriteLine(newObj1);            }            else            {                //Debug.Write

5、Line("失败");                Debug.WriteLine(newObj1["error_code"].Value+":"+newObj1["reason"].Value);            }              //2.货币列表            stringurl2="http://op.juhe.cn/onebox/exchange/list";             varparameters2=newDictionary();             parameters2.A

6、dd("key",appkey);//你申请的key             stringresult2=sendPost(url2,parameters2,"get");             JsonObjectnewObj2=newJsonObject(result2);            StringerrorCode2=newObj2["error_code"].Value;             if(errorCode2=="0")            {                Debug.WriteLine("成功");    

7、            Debug.WriteLine(newObj2);            }            else            {                //Debug.WriteLine("失败");                Debug.WriteLine(newObj2["error_code"].Value+":"+newObj2["reason"].Value);            }              //3.实时汇率查询换算            stringurl3="http://op.juh

8、e.cn/onebox/

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。