12 2020 档案
摘要:获取有效位数,当是小数时可以使用; /// <summary> /// 小数获取有效位数 /// </summary> /// <param name="dvalue">数值</param> /// <param name="digit">位数</param> /// <returns>返回值</r
阅读全文
摘要:a) 写法轻松,更新效率高: update table1 set field1=table2.field1,field2=table2.field2 from table2 where table1.id=table2.id 或者写成: update table1 set field1=b.fiel
阅读全文
摘要:当我们遍历一个已知实体类时我们可以这样来做,但是动态实体无法获取到类的GetType() List<student> item= conn.Query<student>($"select * from 表 where id=123 ").ToList(); foreach (System.Refle
阅读全文
摘要:十进制数字转换成罗马数字 public string IntToRoman(int num) { string res = String.Empty; List<int> val = new List<int> { 1000, 900, 500, 400, 100, 90, 50, 40, 10,
阅读全文