摘要: int i = 9;if (i % 2 == 0) goto Found;else goto NoFound; NoFound: Console.WriteLine(i.ToString() + "不是偶数"); goto finish;//出口点 Found: Console.WriteLine(i.ToString() + "为偶数"); goto finish; //出口点 finish: Console.Read(); 阅读全文
posted @ 2013-07-17 19:40 pnljs 阅读(791) 评论(0) 推荐(0) 编辑
摘要: Type trypInfo = typeof(Program);// Program为类名//获得方法名string str = "包括的方法名列表:\r\n";MethodInfo[] methodInfo = trypInfo.GetMethods();foreach (MethodInfo mInfo in methodInfo){ str += mInfo.ToString() + "\r\n";} 注:需要引用using System.Reflection; 阅读全文
posted @ 2013-07-17 19:36 pnljs 阅读(1158) 评论(0) 推荐(0) 编辑
摘要: exec sp_Msforeachtable 'drop table ?'删除数据库里面所有表执行上面的语句就可以了。值得注意的是若是有主外键关系的话,执行时会出现提示,你多执行几次就会将所有的表全部删除。 阅读全文
posted @ 2013-07-17 16:00 pnljs 阅读(186) 评论(0) 推荐(0) 编辑
摘要: CREATE TABLE TreeShip([ID] uniqueidentifier PRIMARY KEY NOT NULL,[Name] [nvarchar](50) NULL,[Remark] [nvarchar](500) NULL,[ParentID] uniqueidentifier not null)GOINSERT INTO TreeShip(ID,Name,Remark,ParentID) values ('47B9AF56-32D8-4561-8096-15D832C47B26','上海一中','源数据','0000 阅读全文
posted @ 2013-07-17 15:47 pnljs 阅读(652) 评论(1) 推荐(0) 编辑
摘要: dt.Columns.Add("ROWNUM", typeof(Int64));dt.Columns["ROWNUM"].SetOrdinal(0); 阅读全文
posted @ 2013-07-17 14:55 pnljs 阅读(493) 评论(0) 推荐(0) 编辑