摘要: static: 静态修饰符1.使用static修饰符声明属于类型本身而不是属于特定对象的静态成员2.如果使用static修饰类,则他的所有成员都必须为静态成员3.使用static修饰的函数,只需要通过类型名称来引用它,不能通过实例来引用静态成员函数readonly:只读访问修饰符1.被readonly修饰的属性只能读取,不能更改属性值public:共有访问修饰符1.公共访问是允许最高的访问级别,能够在一个类中,通过实例化另一个类,然后访问它的成员protected:成员访问修饰符1.实例化派生类,能够通过实例化的派生类访问到基类的成员private:私有访问修饰符1.在别的类中,只能访问共有成 阅读全文
posted @ 2012-11-04 14:42 蓬莱仙羽 阅读(313) 评论(0) 推荐(0)
摘要: <html><head><style>#bg{position:absolute;left:0;top:0;width:100%;height:100%;background:#000;font-size:40px;color:#ccc;text-align:center;}#colorLine{width:400px;}#colorLine div{width:5px;height:2px;float:left;overflow:hidden;}</style></head><body><table id=&quo 阅读全文
posted @ 2012-11-04 14:25 蓬莱仙羽 阅读(171) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Collections;namespace GEP编程{ class Program { public static void Main(string[] args) { Stopwatch wp = new Stopwatch(); wp.Start(); //创建A-F所对应的0-5索引数字 Hashtable wn = new Hashtable(); 阅读全文
posted @ 2012-11-02 22:12 蓬莱仙羽 阅读(187) 评论(0) 推荐(0)
摘要: 在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢?1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录 delete from people where peopleName in (select peopleNam 阅读全文
posted @ 2012-11-01 19:28 蓬莱仙羽 阅读(153) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;namespace Dictionary测试{ class Program { static void Main(string[] args) { //Hashtable的使用 Hashtable ht=new Hashtable(); ht.Add(10141303, "丁小未"); ht.Add(10141301, "陈立"); Conso 阅读全文
posted @ 2012-11-01 14:37 蓬莱仙羽 阅读(313) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Dictionary测试{ class Program { private const string HXW = "啊阿埃挨哎唉哀皚癌藹矮艾礙愛隘鞍氨咹俺按暗岸胺案肮昂盎凹敖熬翱襖傲奧懊澳芭捌扒叭吧笆疤巴拔跋靶紦耙壩霸罷爸苩柏百擺佰敗拜稗斑癍搬扳般頒板蝂扮拌伴瓣半か絆邦幫梆榜膀綁棒磅蚌鎊傍謗苞胞包褒剝薄雹保堡飽寶菢報暴豹鮑爆杯碑悲卑丠輩褙贔鋇倍狽備憊焙被奔苯夲笨崩繃甭泵蹦迸逼鼻仳鄙筆彼碧蓖蔽畢斃毖幣庇痹 阅读全文
posted @ 2012-11-01 14:22 蓬莱仙羽 阅读(1291) 评论(0) 推荐(0)
摘要: using System; using System.Data; using System.Xml; using System.Data.SqlClient; using System.Collections; using System.Configuration;namespace BookDAL { /// <summary> /// SqlServer数据访问帮助类 /// </summary> public sealed class SqlHelper { #region 私有构造函数和方法 private SqlHelper() { } /// <sum 阅读全文
posted @ 2012-10-27 15:28 蓬莱仙羽 阅读(248) 评论(0) 推荐(0)
摘要: static string sqlcon = "server=.;database=;Integrated Security=true;";/// <summary>/// 新增数据/// </summary>public static void Add(){ //string sqlcon = "server=.;database=;Integrated Security=true;"; SqlConnection conn=new SqlConnection(sqlcon); string sqlStr="inser 阅读全文
posted @ 2012-10-26 11:22 蓬莱仙羽 阅读(189) 评论(0) 推荐(0)
摘要: using System;using System.Text;using System.Net.Sockets;using System.Net.Mail;using System.Net;namespace DotNet.Utilities{ /// <summary> /// 网络操作相关的类 /// </summary> public class NetHelper { #region 检查设置的IP地址是否正确,返回正确的IP地址 /// <summary> /// 检查设置的IP地址是否正确,并返回正确的IP地址,无效IP地址返回"-1& 阅读全文
posted @ 2012-10-26 00:21 蓬莱仙羽 阅读(367) 评论(0) 推荐(0)
摘要: using System.Xml;using System.Data;namespace DotNet.Utilities{ /// <summary> /// Xml的操作公共类 /// </summary> public class XmlHelper { #region 字段定义 /// <summary> /// XML文件的物理路径 /// </summary> private string _filePath = string.Empty; /// <summary> /// Xml文档 /// </summary& 阅读全文
posted @ 2012-10-26 00:13 蓬莱仙羽 阅读(327) 评论(0) 推荐(0)