原创 C#判斷useragent是pc還是手機端

public static bool CheckAgent(string userAgent) { bool flag = false; string[] keywords

原创 C#動態創建對象和其屬性

       dynamic contact = new ExpandoObject(); contact.Name = "Patrick Hines"; contact.Phone =

原创 SqlServer查看所有表數據條數

select a.name as 表名, max(b.rows) as 記錄條數 from sysobjects a ,sysindexes b where a.id=b.id and a.xtype='u' group by

原创 查看當前執行的sql

SELECT TOP 100 t.hostname, t.loginame, percent_complete, [session_id] ,

原创 手機號脫敏處理

Regex.Replace(LoginMobile, @"(?im)(\d{3})(\d{4})(\d{4})", "$1****$3"); //13431230555變成134****0555   

原创 Win10微軟官方鏡像iso文件下載

1、轉到下載頁面2、按F12後點擊小窗口左上角的手機圖標3:刷新頁面開始下載(win10.iso:鏈接)  

原创 SqlServer outer apply(cross apply)

select * from baiduacg_cookies c cross apply (select top 1 * from product where AccountId=c.AccountId order by CreateT

原创 Json數組轉List

List<Person> list = obj.list.ToObject<List<Person>>()  

原创 dnspy查看async方法

 

原创 C# goto 語法

test: Console.WriteLine("yest"); goto test;  

原创 SqlServer查看索引信息

sp_helpindex tablename     

原创 SQLServer強制重編譯執行計劃

sql語句中 1 select * from Student where id =1 option (recompile) 存儲過程中 create proc proc_test (@i int) with recompile as

原创 查看SqlServer版本

 

原创 Winform打包生成exe

1、首選下載安裝Microsoft Visual Studio Installer Projects擴展插件   2、新建項目選擇模板setup      3、第三步:項目創建成功之後,添加文件1.右擊Application Folde

原创 VS代碼片段快捷鍵