代码改变世界

C# GetType()

2017-09-29 15:17 by FingalZhu, 288 阅读, 0 推荐, 收藏, 编辑
摘要:T model = new T();PropertyInfo[] propertys = model.GetType().GetProperties();foreach (PropertyInfo pi in propertys) {if (type == typeof(object))//T是dymamic { ... 阅读全文

使用tfs online做代码片段笔记管理

2016-06-18 10:41 by FingalZhu, 228 阅读, 0 推荐, 收藏, 编辑
摘要:网址tfs.visualstudio.com 注册个账号 本地建一个网站代码片段,这样在vs上做笔记管理可以直接签入也可以在vs搜索代码片段,tfs onlien在线也可以搜索代码需要安装一个codesearch 阅读全文

if exists

2016-06-15 15:40 by FingalZhu, 133 阅读, 0 推荐, 收藏, 编辑
摘要:use masterif exists(select *from sysdatabases where name='Images' )drop database Imagesgocreate database Imagesgouse Imagesgocreate table image( image 阅读全文

强制删除数据库

2016-06-15 15:39 by FingalZhu, 121 阅读, 0 推荐, 收藏, 编辑
摘要:use mastergoalter database 数据库名 set single_user with rollback immediate godrop database 数据库名 阅读全文

TreeView

2016-06-15 11:31 by FingalZhu, 167 阅读, 0 推荐, 收藏, 编辑
摘要:protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindTreeViewList(); } } private void BindTreeViewList() { Provinces m_provin 阅读全文