07 2015 档案
摘要:在 实际问题中,有些变量的取值被限定在一个有限的范围内。例如,一个星期内只有七天,一年只有十二个月,性别只有男跟女等等。如果把这些量说明为整型、字符 型或其它类型显然是不妥当的。为此,C#提供了一种称为“枚举”的类型。在“枚举”类型的定义中列举出所有可能的取值,被说明为该“枚举”类型的变量取值 不能...
阅读全文
摘要:项目数据库里已经有了省市数据,任务是导入县数据。其中省市县之间有外键关系。public void ImportCounties(List counties){List cities = counties.Select(d => d.City).ToList();MyTestEntities db =...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window...
阅读全文
摘要:昨天发现的了一段非常令人惊奇的JavaScript代码,是由ShaunF编写的automatically solves captchas,一个专门应用在Megaupload网站的Greasemonkey脚本。如果你要亲自尝试一下,可以先看看这个演示。而这个脚本的作用,正如名字所示,可以识别这个网站的...
阅读全文
摘要:需要引入类库 Microsoft.Office.Interop.Wordusing System;using System.Collections.Generic;using System.Text;using Microsoft.Office.Interop.Word;using System.I...
阅读全文