原创 C# 模擬微信紅包功能,三種算法

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; n

原创 NPOI導入導出EXCEL通用類,供參考,可直接使用在WinForm項目中

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Da

原创 C#多線程框架SmartThreadPool使用示例

using Amib.Threading; //nuget安裝SmartThreadPool using System; using System.Threading; namespace Magic.Sample { cla

原创 數據庫命令行工具osql.exe工具的妙用和相關參數

goto :main osql :sqlserver外部命令工具,說白了就是微軟作的一個exe程序可以連本機服務器或者其他服務器 -S 指定sql數據庫服務器 -U 用戶名 -P 密碼 -d 數據庫 -i 使用輸入文件 -o 指定一個文

原创 dism環境下安裝net4.5

dism /online /enable-feature /featurename:IIS-ISAPIFilter dism /online /enable-feature /featurename:IIS-ISAPIExtension

原创 Sqlserver遞歸查詢所有上級或所有下級成員

--菜單目錄結構表 create table tb_menu( id int not null, --主鍵id title varchar(50), --標題 parent int --parent id ); --查找所有上級節

原创 Sqlserver查詢表描述和字段相關信息

--查詢表結構 CREATE PROCEDURE sp_QueryTable @TableName NVARCHAR(200) --表名 AS select a.name as table_name, b.name as colum

原创 C#通過反射獲取類中的方法和參數個數,反射調用方法帶參數

using System; using System.Reflection; namespace ConsoleApp2 { class Program { static void Main(string

原创 C#中StreamReader和StreamWriter中文亂碼問題

using System; using System.IO; using System.Text; namespace ConsoleApp7 { class Program { static void

原创 Sqlserver清理緩存和內存

--清除存儲過程緩存 DBCC FREEPROCCACHE --清除會話緩存 DBCC FREESESSIONCACHE --清除系統緩存 DBCC FREESYSTEMCACHE('All') --清除所有緩存 DBCC

原创 C# 中Byte[]和File文件互相轉換

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; na

原创 javascript 工具類Lodash集合查詢,修改,刪除使用例子

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

原创 C# 中Linq查詢所有上級節點或所有下級節點

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Http; using Syste

原创 C#中使用CDO.Message發送郵件,成功率極高

using CDO; using System; namespace ConsoleApp1 { class Program { static void Main(string[] args)

原创 Sqlserver判斷數據庫表,字段,存儲過程等是否存在

--判斷數據庫是否存在 if exists (select * from sys.databases where name = '數據庫名') --drop database [數據庫名] --判斷表是否存在 if