上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 74 下一页

2018年6月6日

C#中int、long、float、double、decimal最大值最小值

摘要: 最近在将java上写的一个简单的表达式求值计算器移植到Windows Phone 8,java中double的精度问题是很明显的,解决办法是改用BigDecimal类。所以觉得C#中用double也是不太好的。C#中用作精度计算的一个数据类型是decimal,对应的类是Decimaldecimal的 阅读全文

posted @ 2018-06-06 15:07 itjeff 阅读(3973) 评论(0) 推荐(0) 编辑

C#整数三种强制类型转换int、Convert.ToInt32()、int.Parse()、string到object 的区别

摘要: 1、int适合简单数据类型之间的转换,C#的默认整型是int32(不支持bool型); 2、int.Parse(string sParameter)是个构造函数,参数类型只支持string类型; 3、Convert.ToInt32()适合将Object类型转换为int型; 4、Convert.ToI 阅读全文

posted @ 2018-06-06 14:41 itjeff 阅读(8316) 评论(0) 推荐(1) 编辑

2018年5月31日

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

摘要: For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, which I believe is a new feature introduced in VS 2017. Go to Tools > 阅读全文

posted @ 2018-05-31 13:30 itjeff 阅读(278) 评论(0) 推荐(0) 编辑

2018年5月30日

VS2015 调试中断点突然失效的解决办法、VS调试时关闭调试让浏览器继续保留页面

摘要: VS2010 调试中断点突然失效的解决办法 问题描述:在调试前加了断点,但debug时红色的断点变成透明的圆圈加一个感叹号,执行到该处时也不会停止。 这个问题遇到过几次了,前几次都没怎么注意,有时候是因为复制粘贴了某段代码后就这样了,然后点击撤销到复制之前的状态,再点保存,之后再复制过来就ok。 实 阅读全文

posted @ 2018-05-30 10:30 itjeff 阅读(4540) 评论(0) 推荐(0) 编辑

2018年5月22日

Postman调用WebService,包括头验证部分

摘要: Postman调用WebService时,Body中选择Raw,最右端选择XML(txt/xml),然后把某个方法显示在页面的xml拷贝到请求框中即可,如下图: 以下是postman中的设置, 阅读全文

posted @ 2018-05-22 15:56 itjeff 阅读(3396) 评论(0) 推荐(0) 编辑

2018年5月15日

C# 正则表达式大全

摘要: //.net中把不是数字和字母的字符串去掉,只留下数字和字母 Console.WriteLine("pls input sth"); var input = Console.ReadLine(); var ss = Regex.Replace(input, "[^a-zA-Z0-9]+", ""); 阅读全文

posted @ 2018-05-15 09:51 itjeff 阅读(7506) 评论(1) 推荐(0) 编辑

2018年5月10日

Webservice超时问题

摘要: Winform客户端调用Webservice 120秒超时.对此问题,针对服务器与客户端分别作了超时设置为300S. 1. 服务器端设置超时 在 web.config 的 system.web 里添加如下配置项: < httpRuntimeexecutionTimeout="300000"/> 记得 阅读全文

posted @ 2018-05-10 11:35 itjeff 阅读(417) 评论(0) 推荐(0) 编辑

C# DateTime的 ParseExact和 TryParseExact 使用说明

摘要: 最近需要把“20121010”转换为“2012-10-10”格式,直接用Convert.ToDateTime("20121010"),系统报错“未被识别的DateTime类型”。 解决方法: 一、DateTime.ParseExact string str = "20121010"; IFormat 阅读全文

posted @ 2018-05-10 11:24 itjeff 阅读(27922) 评论(0) 推荐(2) 编辑

2018年5月7日

NLog自定义字段写入数据库表,示例

摘要: //自定义字段写入NLog日志 private void saveNLog(InvokeLogModel model) { LogEventInfo ei = new LogEventInfo(); ei.Properties["InvokeResult"] = model.InvokeResult; ei.Properties["RequestUrl"] = model.RequestUrl... 阅读全文

posted @ 2018-05-07 09:18 itjeff 阅读(988) 评论(0) 推荐(0) 编辑

2018年4月27日

Newtonsoft.Json高级用法

摘要: 手机端应用讲究速度快,体验好。刚好手头上的一个项目服务端接口有性能问题,需要进行优化。在接口多次修改中,实体添加了很多字段用于中间计算或者存储,然后最终用Newtonsoft.Json进行序列化返回数据,经过分析一个简单的列表接口每一行数据返回了16个字段,但是手机APP端只用到了其中7个字段,剩余 阅读全文

posted @ 2018-04-27 09:44 itjeff 阅读(838) 评论(0) 推荐(0) 编辑

上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 74 下一页

导航