<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_我的程序岁月_分类_c#</title><id>http://feed.cnblogs.com/blog/u/32927/category/123258/rss</id><updated>2012-06-04T00:18:25Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/category/123258.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/32927/category/123258/rss"/><entry><id>http://www.cnblogs.com/madengwei/archive/2012/04/08/2438100.html</id><title type="text">ASP.NET缓存依赖--自定义缓存依赖</title><summary type="text">在ASP.NET中，它允许你继承CacheDependency类创建自定义的缓存依赖，这和上一节所讲的SqlCacheDependency类所做的差不多。设计一个自定义的CacheDependency类很简单，你要做的只是启动一个异步任务，它检查依赖项目何时发生变化。依赖项目发生变化时，将调用基方法CacheDependency.NotifyDependencyChanged。作为回应，基类更新HasChanged与UTclastModified属性值，并且ASP.NET自动从缓存中移除所有相关项目。我们知道，现在的许多网站都提供了RSS功能，从而方便我们去订阅。因此，在我们的应用程序里订阅.</summary><published>2012-04-08T14:09:00Z</published><updated>2012-04-08T14:09:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2012/04/08/2438100.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2012/04/08/2438100.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2012/04/08/2438077.html</id><title type="text">ASP.NET缓存依赖--SQL Server 2005与SQL Server 2008缓存依赖</title><summary type="text">其实，在某些方案中，使用带有 SQL 依赖项的缓存可显著提高你的应用程序的性能。例如，假定你正在构建一个从数据库显示产品信息的电子商务应用程序。如果不进行缓存，则每当用户要查看产品时，应用程序都必须从数据库请求数据，执行相关的数据库连接、查询等命令。如果查询访问量很大时，这对于服务器与数据库来讲其耗费的资源是不可估量的。要解决这样的问题，你可以根据需要在某一时刻将产品信息缓存一天或者一段时间，由于产品信息已经在内存中，因此可确保较快的响应时间，从而也减少了数据库的访问量。 但是，当数据库的产品信息发生变化时，缓存的产品信息就会失去与数据库中的产品信息的同步，且不同步的时间最长可达你设置的缓存.</summary><published>2012-04-08T13:57:00Z</published><updated>2012-04-08T13:57:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2012/04/08/2438077.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2012/04/08/2438077.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/10/13/1582869.html</id><title type="text">&amp;lt;&amp;lt;易学C#&amp;gt;&amp;gt;全书目录</title><summary type="text">经过一年之久的创作,我的新书&gt;终于出版了,目录如下:预备课：学习从这里开始11．软件=程序+文档12．程序起什么作用23．为何要面向对象24．什么是UML35．.NET与C#4谈微软公司的.NET战略4C#的产生与特点5C#与.NET的关系66．开启C#的钥匙——兴趣与正确的学习方法77．习题练习8..........................................</summary><published>2009-10-13T15:44:00Z</published><updated>2009-10-13T15:44:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/10/13/1582869.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/10/13/1582869.html"/><content type="text">经过一年之久的创作,我的新书&gt;终于出版了,目录如下:预备课：学习从这里开始11．软件=程序+文档12．程序起什么作用23．为何要面向对象24．什么是UML35．.NET与C#4谈微软公司的.NET战略4C#的产生与特点5C#与.NET的关系66．开启C#的钥匙——兴趣与正确的学习方法77．习题练习8..........................................</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/09/26/1574570.html</id><title type="text">用C#编程合并多个WORD文档</title><summary type="text">今天因为客户需要，需要将多个WORD文档合并成为一个WORD文档。其中，对WORD文档的合并方式分两种形式：一是复制合并;一是插入合并,即将多个文档按照先后顺序合并到另一个文档中.</summary><published>2009-09-26T09:46:00Z</published><updated>2009-09-26T09:46:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/09/26/1574570.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/09/26/1574570.html"/><content type="text">今天因为客户需要，需要将多个WORD文档合并成为一个WORD文档。其中，对WORD文档的合并方式分两种形式：一是复制合并;一是插入合并,即将多个文档按照先后顺序合并到另一个文档中.</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/25/1421795.html</id><title type="text">荣获2009年“微软最有影响力开发者”</title><summary type="text">今天无意中收到微软“最有影响力开发者”礼包，这比起博客园的其他兄弟虽然不算什么，但这毕竟是我第一次得到微软的称号，还是值得纪念一下。 “最有影响力的开发者”，您好很高兴能够通过“最有影响力的开发者”这个项目将微软最新的技术资源与您一同分享。第一期技术资源我们已经随此次“最有影响力的开发者欢迎礼包”一同邮...</summary><published>2009-03-25T12:49:00Z</published><updated>2009-03-25T12:49:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/25/1421795.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/25/1421795.html"/><content type="text">今天无意中收到微软“最有影响力开发者”礼包，这比起博客园的其他兄弟虽然不算什么，但这毕竟是我第一次得到微软的称号，还是值得纪念一下。 “最有影响力的开发者”，您好很高兴能够通过“最有影响力的开发者”这个项目将微软最新的技术资源与您一同分享。第一期技术资源我们已经随此次“最有影响力的开发者欢迎礼包”一同邮...</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/13/1411099.html</id><title type="text">[易学C#]C#3.0语言新特性</title><summary type="text"/><published>2009-03-13T13:42:00Z</published><updated>2009-03-13T13:42:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/13/1411099.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/13/1411099.html"/><content type="text"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/12/1409291.html</id><title type="text">[易学C#]C#3.0语言新特性之Lambda表达式</title><summary type="text">在C#2.0中引入了匿名方法，允许在期望出现委托的时候以“内联”的代码替代之。尽管匿名方法提供了函数式编程语言中的很多表达能力，但匿名方法的语法实在是太罗嗦了，并且很不自然。Lambda表达式为书写匿名方法提供了一种更加简单、更加函数化的语法。实际上Lambda表达式的本质是匿名方法，也即是当编译我们的程序代码时，编译器会自动帮我们将Lambda表达式转换为匿名方法。</summary><published>2009-03-12T00:38:00Z</published><updated>2009-03-12T00:38:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/12/1409291.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/12/1409291.html"/><content type="text">在C#2.0中引入了匿名方法，允许在期望出现委托的时候以“内联”的代码替代之。尽管匿名方法提供了函数式编程语言中的很多表达能力，但匿名方法的语法实在是太罗嗦了，并且很不自然。Lambda表达式为书写匿名方法提供了一种更加简单、更加函数化的语法。实际上Lambda表达式的本质是匿名方法，也即是当编译我们的程序代码时，编译器会自动帮我们将Lambda表达式转换为匿名方法。</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/10/1408186.html</id><title type="text">[易学C#]C#3.0语言新特性之对象和集合初始化器</title><summary type="text">在C#3.0中，一个对象创建表达式可以包含一个对象或集合初始化器，用于初始化新创建的对象的成员或新创建的集合的元素。对象创建表达式：new type (argument-list（可选）) 对象或集合初试化器（可选）new type 对象或集合初试化器一个对象创建表达式可以省略构造器参数列表，并将其连同圆括号一起替换为一个对象或集合初始化器。省略构造器参数列表并将其连同圆括号一起替换为一个对象或集合初始化器等价于指定一个空的参数列表。在执行一个带有对象或集合初始化器的对象创建表达式时，首先调用实例构造器，然后执行对象或集合初始化器指定的成员或元素初始化。对象或集合初始化器不能引用正在初始化的对象实例。</summary><published>2009-03-10T13:09:00Z</published><updated>2009-03-10T13:09:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/10/1408186.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/10/1408186.html"/><content type="text">在C#3.0中，一个对象创建表达式可以包含一个对象或集合初始化器，用于初始化新创建的对象的成员或新创建的集合的元素。对象创建表达式：new type (argument-list（可选）) 对象或集合初试化器（可选）new type 对象或集合初试化器一个对象创建表达式可以省略构造器参数列表，并将其连同圆括号一起替换为一个对象或集合初始化器。省略构造器参数列表并将其连同圆括号一起替换为一个对象或集合初始化器等价于指定一个空的参数列表。在执行一个带有对象或集合初始化器的对象创建表达式时，首先调用实例构造器，然后执行对象或集合初始化器指定的成员或元素初始化。对象或集合初始化器不能引用正在初始化的对象实例。</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/09/1407374.html</id><title type="text">[易学C#]C#3.0语言新特性之扩展方法 </title><summary type="text">当我们需要对已有类的功能进行扩展时，我们通常会想到继承，继承已有类，然后为其加入新的行为。而C# 3.0中加入的扩展方法（Extension Methods）特性，则提供了另一种实现功能扩展的方式。扩展方法是一种特殊的静态方法，它定义在一个静态类中，但可以在其他类的对象上像调用实例方法那样进行调用。因此，通过扩展方法，我们就可以在不修改一个类型的前提下对一个类型进行功能上的扩充，这种方法并不会产生新的类型，而是采用向已有类中加入新方法的方式来完成功能扩展；同时，也可以将一些近似的类型中近似的功能同一实现在一个类中，便于阅读和维护。从最终效果上看，扩展方法使得扩展一个现有类型和构造一个具有附加方法的类型变成了现实。</summary><published>2009-03-09T15:04:00Z</published><updated>2009-03-09T15:04:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/09/1407374.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/09/1407374.html"/><content type="text">当我们需要对已有类的功能进行扩展时，我们通常会想到继承，继承已有类，然后为其加入新的行为。而C# 3.0中加入的扩展方法（Extension Methods）特性，则提供了另一种实现功能扩展的方式。扩展方法是一种特殊的静态方法，它定义在一个静态类中，但可以在其他类的对象上像调用实例方法那样进行调用。因此，通过扩展方法，我们就可以在不修改一个类型的前提下对一个类型进行功能上的扩充，这种方法并不会产生新的类型，而是采用向已有类中加入新方法的方式来完成功能扩展；同时，也可以将一些近似的类型中近似的功能同一实现在一个类中，便于阅读和维护。从最终效果上看，扩展方法使得扩展一个现有类型和构造一个具有附加方法的类型变成了现实。</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/08/1406260.html</id><title type="text">[易学C#]C#3.0语言新特性之匿名类型 </title><summary type="text">上面我们向读者讲解了隐式类型，接下来我们继续来讨论C#3.0另一个新特性：匿名类型。</summary><published>2009-03-08T08:01:00Z</published><updated>2009-03-08T08:01:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/08/1406260.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/08/1406260.html"/><content type="text">上面我们向读者讲解了隐式类型，接下来我们继续来讨论C#3.0另一个新特性：匿名类型。</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/08/1406066.html</id><title type="text">[易学C#]C#3.0语言新特性之隐式类型</title><summary type="text">在C#3.0中增加了一个变量声明var，这个声明和JavaScript 的var类似，但也有不同。相同之处是它可以用var来声明任何类型的局部变量；而不同之处在于它仅仅负责告诉编译器，该变量需要根据初始化表达式来推断变量的类型，而且只能是局部变量。</summary><published>2009-03-07T16:11:00Z</published><updated>2009-03-07T16:11:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/08/1406066.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/08/1406066.html"/><content type="text">在C#3.0中增加了一个变量声明var，这个声明和JavaScript 的var类似，但也有不同。相同之处是它可以用var来声明任何类型的局部变量；而不同之处在于它仅仅负责告诉编译器，该变量需要根据初始化表达式来推断变量的类型，而且只能是局部变量。</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2009/03/07/1405418.html</id><title type="text">[讨论]程序之路在何方？</title><summary type="text">曾经何时，在那个DOS与Windows的年代，汇编与C/C++横行天下，无人可比！与此同时，汇编与C/C++程序员无疑成为新的IT时代的弄潮儿，呼风唤雨。 在这之间，也不怎么的，突然有一天，有一个叫Linus的家伙静悄悄地搞出个Linux来，经过几年的开源的发展，终成气候，誓与Windows争霸天下。当然，因为它的开源性，不知不觉冒出了许多版本的Linux来。这时候Windows/Linux/Un...</summary><published>2009-03-07T04:04:00Z</published><updated>2009-03-07T04:04:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2009/03/07/1405418.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2009/03/07/1405418.html"/><content type="text">曾经何时，在那个DOS与Windows的年代，汇编与C/C++横行天下，无人可比！与此同时，汇编与C/C++程序员无疑成为新的IT时代的弄潮儿，呼风唤雨。 在这之间，也不怎么的，突然有一天，有一个叫Linus的家伙静悄悄地搞出个Linux来，经过几年的开源的发展，终成气候，誓与Windows争霸天下。当然，因为它的开源性，不知不觉冒出了许多版本的Linux来。这时候Windows/Linux/Un...</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/11/02/1324904.html</id><title type="text">删除ORACLE数据库中重复的数据</title><summary type="text"/><published>2008-11-02T10:54:00Z</published><updated>2008-11-02T10:54:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/11/02/1324904.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/11/02/1324904.html"/><content type="text"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/07/08/1238193.html</id><title type="text">用C#解决Oracle9i和Oracle10g字符集不兼容的问题</title><summary type="text"/><published>2008-07-08T06:59:00Z</published><updated>2008-07-08T06:59:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/07/08/1238193.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/07/08/1238193.html"/><content type="text"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/07/04/1235324.html</id><title type="text">重拾　DirectX　一：配置Visual Studio 2008+Microsoft DirectX SDK (June 2008) 开发环境</title><summary type="text">几年前，我曾经搞了一小段时间DirectX开发，但最后因为工作的原因还是放弃了．直到今天，出于兴趣的原因，我又翻开DirectX的第一页．．．．好了，我还是直接进入主题：首先是安装Microsoft DirectX SDK . 然后选择工具－选项，打开选项框．最后选展开“项目和解决方案”，选择“VC++目录”，在右边的界面中有一个“显示以下内容的目录”下拉选择框，分别配置其中“包含文件”和“库文件”。如：＂D:\Program Files\Microsoft DirectX SDK (June 2008)\Include＂和＂D:\Program Files\Microso</summary><published>2008-07-04T02:32:00Z</published><updated>2008-07-04T02:32:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/07/04/1235324.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/07/04/1235324.html"/><content type="text">几年前，我曾经搞了一小段时间DirectX开发，但最后因为工作的原因还是放弃了．直到今天，出于兴趣的原因，我又翻开DirectX的第一页．．．．好了，我还是直接进入主题：首先是安装Microsoft DirectX SDK . 然后选择工具－选项，打开选项框．最后选展开“项目和解决方案”，选择“VC++目录”，在右边的界面中有一个“显示以下内容的目录”下拉选择框，分别配置其中“包含文件”和“库文件”。如：＂D:\Program Files\Microsoft DirectX SDK (June 2008)\Include＂和＂D:\Program Files\Microso</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/07/03/1234539.html</id><title type="text">Oracle 查询语句截取字符串</title><summary type="text"/><published>2008-07-03T02:12:00Z</published><updated>2008-07-03T02:12:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/07/03/1234539.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/07/03/1234539.html"/><content type="text"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/07/01/1233534.html</id><title type="text">一个C#操作Oracle的通用类</title><summary type="text">前段时间，因为开发一个项目需要Oracle10g数据库，所以就快速写了一个Oracle的通用类，希望各位网友参考！</summary><published>2008-07-01T12:39:00Z</published><updated>2008-07-01T12:39:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/07/01/1233534.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/07/01/1233534.html"/><content type="text">前段时间，因为开发一个项目需要Oracle10g数据库，所以就快速写了一个Oracle的通用类，希望各位网友参考！</content></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/06/12/1218349.html</id><title type="text">C#动态分配一维数组和二维数组函数</title><summary type="text"/><published>2008-06-12T06:07:00Z</published><updated>2008-06-12T06:07:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/06/12/1218349.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/06/12/1218349.html"/><content type="text"/></entry><entry><id>http://www.cnblogs.com/madengwei/archive/2008/03/07/1095571.html</id><title type="text">C#把DataSet内数据转化为Excel和Word文件的通用类</title><summary type="text">前不久因为项目的需要写的一个C#把DataSet内数据转化为Excel和Word文件的通用类,这些关于Excel、Word的导出方法，基本可以实现日常须要，其中有些方法可以把数据导出后 生成Xml格式，再导入数据库！有些屏蔽内容没有去掉，保留下来方便学习参考用之。 最后请引用Office相应COM组件，导出Excel对象的一个方法要调用其中的一些方法和属性。</summary><published>2008-03-07T10:15:00Z</published><updated>2008-03-07T10:15:00Z</updated><author><name>马伟</name><uri>http://www.cnblogs.com/madengwei/</uri></author><link rel="alternate" href="http://www.cnblogs.com/madengwei/archive/2008/03/07/1095571.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/madengwei/archive/2008/03/07/1095571.html"/><content type="text">前不久因为项目的需要写的一个C#把DataSet内数据转化为Excel和Word文件的通用类,这些关于Excel、Word的导出方法，基本可以实现日常须要，其中有些方法可以把数据导出后 生成Xml格式，再导入数据库！有些屏蔽内容没有去掉，保留下来方便学习参考用之。 最后请引用Office相应COM组件，导出Excel对象的一个方法要调用其中的一些方法和属性。</content></entry></feed>
