C#
某某开发仔。
这个作者很懒,什么都没留下…
展开
-
C#中文取首字母大写
C# 中文取首字母大写原创 2022-09-14 10:55:38 · 391 阅读 · 1 评论 -
--NPOI读取Excel单元格中的公式值
1 /// <summary>读取excel 2 /// 默认第一行为表头 3 /// </summary> 4 /// <param name="strFileName">excel文档绝对路径</param> 5 /// <param name="rowIndex">内容行偏移量,第一行为表头,内容行从第二行开始则为1</param>.原创 2021-03-19 14:29:14 · 1870 阅读 · 1 评论 -
合并两个结构相同的datatable
在这里插入代码片 OrmInfo orm1 = new OrmInfo(); OrmInfo orm2 = new OrmInfo(); var oldsql = "select * from INS_BUSINESSINFO"; DataSet ds1 = SGZJKDatabase.SQL.ExecuteDataSet(oldsql, false, null, ormInfo, null); orm1.原创 2020-07-27 09:22:03 · 486 阅读 · 0 评论 -
HttpWebRequest 出错时获取相应的Response信息
HttpWebResponse response; try { response = (HttpWebResponse)webReq.GetResponse(); } catch (WebException ex) { response = (HttpWebResponse)...原创 2020-07-13 11:00:17 · 325 阅读 · 0 评论 -
JSON字符串的序列号和反序列号
/// <summary> /// 把对象转换为JSON字符串 /// </summary> /// <param name="o">对象</param> /// <returns>JSON字符串</returns> public static string ToJSON(this object o) { ...原创 2020-06-30 17:48:58 · 659 阅读 · 0 评论 -
Windows 服务的安装与卸载
InstallWindows 服务的安装Install.bat%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe %~dp0xxx.exefor /f %%a in (%~dp0name.txt) do (set d=%%a)Net Start %d%sc config %d% start= autoUninstallWindows 服务的卸载Uninstall.batfor /f %%a in (%~dp原创 2020-05-11 17:51:36 · 172 阅读 · 0 评论 -
C# 事务
分布式事务 using (TransactionScope scope = new TransactionScope()) { try { scope.Complete(); } catch { } }单步事务using (Db...原创 2020-03-25 15:02:46 · 99 阅读 · 0 评论