博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 75 下一页

2010年10月10日

摘要: 集合与泛型>集合集合可以分为泛型集合类和非泛型集合类。泛型集合类一般位于System.Collections.Generic命名空间,非泛型集合类位于System.Collections命名空间,除此之外,System.Collection.Specialized命名空间也有些集合类。数组集合类     System.Collections.ArrayList;布尔集合类     Syste... 阅读全文

posted @ 2010-10-10 21:11 moss_tan_jun 阅读(504) 评论(0) 推荐(0) 编辑

摘要: 注:不包含交错数组的内容。1.数组的申明及赋值既可以声明时指定数组的大小,也可以不指定大小,但数组是必须指定大小,要在什么地方指定大小看个人习惯了。[代码]2.对多维数组的理解/*创建一个三维数组*/[代码]这里的4表示有4个二维数组;3表示有3个一个维数组;2表示一维数组的长度为2 ;C#中所有类型的数组都继承至Array类,且数组是引用类型。数组的元素可以是值类型也可以是引用类型。一维数组和泛... 阅读全文

posted @ 2010-10-10 21:09 moss_tan_jun 阅读(243) 评论(0) 推荐(0) 编辑

摘要: publicstaticstringEncode(stringstr,stringkey)2{3DESCryptoServiceProviderprovider=newDESCryptoServiceProvider();4provider.Key=Encoding.ASCII.GetBytes(key.Substring(0,8));5provider.IV=Encoding.ASCII.Get... 阅读全文

posted @ 2010-10-10 21:07 moss_tan_jun 阅读(369) 评论(0) 推荐(0) 编辑

摘要: 1、使用FileStream读写文件 文件头: using System;using System.Collections.Generic;using System.Text;using System.IO; 读文件核心代码: byte[] byData = new byte[100];char[] charData = new char[1000]; try{FileStream sFile =... 阅读全文

posted @ 2010-10-10 21:04 moss_tan_jun 阅读(403) 评论(0) 推荐(0) 编辑

摘要: 抽象类>什么是抽象类抽象类的声明中包含abstract关键字。只要有一个方法具有abstract修饰即声明为抽象方法,那么这个类就是抽象类。抽象类,就是提供类的定义,不提供类的具体实现细节(可实现部分细节,但不全实现)。抽象类的实现交由派生类来完成。抽象类>声明抽象类代码 Code highlighting produced by Actipro CodeHighlighter (fr... 阅读全文

posted @ 2010-10-10 21:02 moss_tan_jun 阅读(278) 评论(0) 推荐(0) 编辑

2010年10月8日

摘要: http://wenku.baidu.com/view/fa1e57fe04a1b0717fd5ddf7.htmlhttp://xgli0910.blog.163.com/blog/static/4696216820097493811102/ 阅读全文

posted @ 2010-10-08 00:05 moss_tan_jun 阅读(217) 评论(0) 推荐(0) 编辑

2010年10月7日

摘要: using System;using System.Timers;namespace 定时器ConsoleApplication1{class Class1{  [STAThread]  static void Main(string[] args) {  System.Timers.Timer aTimer = new System.Timers.Timer();  aTimer.Elapsed... 阅读全文

posted @ 2010-10-07 13:15 moss_tan_jun 阅读(346) 评论(0) 推荐(0) 编辑

2010年9月28日

摘要: --判断[TestDB]是否存在ifexists(select1frommaster..sysdatabaseswherename='TestDB')print'TestDB存在'elseprint'TestDB不存在'--判断表[TestTb]是否存在ifexists(select*fromTestDB..syscolumnswhereid=object_id('TestDB.dbo.TestT... 阅读全文

posted @ 2010-09-28 23:03 moss_tan_jun 阅读(7380) 评论(0) 推荐(0) 编辑

摘要: 一共有三个存储过程sp_addlinkedserver 添加服务器链接sp_linkedservers 查询服务器链接sp_dropserver 删除服务器链接示例:---------------------------------------首先建立链接服务器EXEC sp_addlinkedserver 'instance1', '', 'MSDASQL', NULL, NULL, 'D... 阅读全文

posted @ 2010-09-28 23:00 moss_tan_jun 阅读(189) 评论(0) 推荐(0) 编辑

摘要: 1、简单介绍using System.Xml; //初始化一个xml实例 XmlDocument xml=new XmlDocument(); //导入指定xml文件xml.Load(path);xml.Load(HttpContext.Current.Server.MapPath("~/file/bookstore.xml")); //指定一个节点 XmlNode root=xml.Select... 阅读全文

posted @ 2010-09-28 22:50 moss_tan_jun 阅读(1128) 评论(0) 推荐(0) 编辑

上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 75 下一页