随笔分类 -  C#

摘要:eg:double n=2.50000; // or 250000 string resultstring=Format("{0:#.#}",n.) ; eg:decimal d=00500; d.ToString("0.##"); // .## 最多保留2位有效数字,但是不包含0。比如:d=0.5 阅读全文
posted @ 2021-12-22 10:47 双手插在裤兜谁也不爱 阅读(1579) 评论(0) 推荐(0) 编辑
摘要:汉字 四角码 eg:0,1,2,3,4,5,6,7,8,9 var zeroSijiao = ShuZiService.Fetch(new SqlInfo { ReturnFields = new List<string> { Define.ShuZiEntity.Field.Ncid, Defin 阅读全文
posted @ 2021-08-13 15:33 双手插在裤兜谁也不爱 阅读(36) 评论(0) 推荐(0) 编辑
摘要:public static string tenToSixteen(int? code, int width) { int amount = (int)code; string current = ""; string codes = "0123456789ABCDEF"; // 设置16进制转换编 阅读全文
posted @ 2021-08-03 17:11 双手插在裤兜谁也不爱 阅读(163) 评论(0) 推荐(0) 编辑
摘要:字符串转为数组 string str = "1,2,3,4"; string[] strArr = str.Split(','); 数组转为字符串 string[] scoresArr = { "1", "2", "3", "4", "5" }; string scores = string.Joi 阅读全文
posted @ 2021-07-21 11:08 双手插在裤兜谁也不爱 阅读(230) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示