摘要:调用新浪接口几个大致步骤首先必须有:1.2.一: 请求用户授权Token:https://api.weibo.com/oauth2/authorize参数 redirect_uri需要与申请的应用的回调地址一致(上线后只要回调地址和你的上线网站在同一个域名下就可以);本地测试最好是将127.0.0.1:10001/ 配置成域名的形式 local.host.com/;配置:C:\WINDOWS\system32\drivers\etc 127.0.0.1 localhost(原有的) 127.0.0.1 local.host.com(新增配置)就ok了。二:获取Access...
阅读全文
摘要:c#中 ==与equals有什么区别对于值类型、引用类型来说比较过程怎样的?using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{ class Person { private string name; public string Name { get { return name; } set { name = value; } } pu...
阅读全文
摘要:1.四舍五入(控制小数点)输入一个数,点击button就弹出一个对话框,里面是已经四舍五入好的数字,如12.595或者12.6或者12.54或者12.553或者12输出结果12.60 12.60 12.54 12.55 12.00代码:double txtnum = Convert.ToDouble(this.textBox1.Text); if (txtnum < 0) { txtnum = Math.Round(txtnum + 5 / Math.Pow(10, 3), 2, MidpointRounding.AwayFromZero); }...
阅读全文
摘要:System.Security 无法将类型为“System.Security.Principal.WindowsIdentity”的对象强制转换为类型“System.Web.Security.FormsIdentity”。今天在编写代码是:无法将类型为“System.Security.Principal.WindowsIdentity”的对象强制转换为类型“System.Web.Security.FormsIdentity”。解决办法如下: 节可以配置相应的处理步骤。具体说来, 开发人员通过该节可以配置 要显示的 html 错误页 以代替错误堆栈跟踪。 -->注意红色字体:改为:
阅读全文