随笔分类 - 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
阅读全文
摘要:汉字 四角码 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
阅读全文
摘要:public static string tenToSixteen(int? code, int width) { int amount = (int)code; string current = ""; string codes = "0123456789ABCDEF"; // 设置16进制转换编
阅读全文
摘要:字符串转为数组 string str = "1,2,3,4"; string[] strArr = str.Split(','); 数组转为字符串 string[] scoresArr = { "1", "2", "3", "4", "5" }; string scores = string.Joi
阅读全文