﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Artech-随笔分类-A. .NET Framework</title><link>http://www.cnblogs.com/artech/category/76621.html</link><description>Develop every application as an art using the most suitable technologies!</description><language>zh-cn</language><lastBuildDate>Fri, 22 May 2009 06:50:35 GMT</lastBuildDate><pubDate>Fri, 22 May 2009 06:50:35 GMT</pubDate><ttl>60</ttl><item><title>[原创] 难道调用ThreadPool.QueueUserWorkItem（&amp;hellip;）的时候，真是必须调用Thread.Sleep（&amp;hellip;）吗？</title><link>http://www.cnblogs.com/artech/archive/2009/05/22/1486761.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Fri, 22 May 2009 01:31:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2009/05/22/1486761.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/1486761.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2009/05/22/1486761.html#Feedback</comments><slash:comments>27</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/1486761.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/1486761.html</trackback:ping><description><![CDATA[摘要: 开门见山，下面的例子中通过调用ThreadPool.QueueUserWorkItem(WaitCallback callBack, object state)的方式实现异步调用：

List<Action> actions = new List<Action>();
//......
foreach (var action in actions)
{
    ThreadPool.QueueUserWorkItem(state => action(), null);
} 
Console.Read();
但是出现错误的输出结果......&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2009/05/22/1486761.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/1486761.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创][MethodImpl(MethodImplOptions.Synchronized)]、lock(this)与lock(typeof(...))</title><link>http://www.cnblogs.com/artech/archive/2008/10/17/1313209.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Fri, 17 Oct 2008 01:16:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2008/10/17/1313209.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/1313209.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2008/10/17/1313209.html#Feedback</comments><slash:comments>23</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/1313209.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/1313209.html</trackback:ping><description><![CDATA[摘要: 对于稍微有点经验的.NET开发人员来说，倘若被问及如何保持线程同步，我想很多人都能说好好几种。在众多的线程同步的可选方式中，加锁无疑是最为常用的。如果仅仅是基于方法级别的线程同步，使用System.Runtime.CompilerServices.MethodImplAttribute无疑是最为简洁的一种方式。MethodImplAttribute可以用于instance method，也可以用于static method。当在某个方法上标注了MethodImplAttribute，并指定MethodImplOptions.Synchronized参数，可以确保在不同线程中运行的该方式以同步的方式运行。我们几天来讨论MethodImplAttribute（MethodImplOptions.Synchronized）和lock的关系。

&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2008/10/17/1313209.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/1313209.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]一个通过BackgroundWorker实现WinForm异步操作的例子</title><link>http://www.cnblogs.com/artech/archive/2008/07/30/1256144.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Wed, 30 Jul 2008 01:44:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2008/07/30/1256144.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/1256144.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2008/07/30/1256144.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/1256144.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/1256144.html</trackback:ping><description><![CDATA[摘要: 在最近的一个Smart Client项目中，为了演示异步操作的实现，写了一个基于BackgorundWorker的例子。由于这个理基本上实现了BackgorundWorker的大部分功能：异步操作的启动、操作结束后的回调、异步操作的撤销和进度报告等等。尽管没有太多的技术含量，姑且放上来与大家分享。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2008/07/30/1256144.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/1256144.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创-总结]深入理解C# 3.x的新特性系列总结</title><link>http://www.cnblogs.com/artech/archive/2007/10/07/915969.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sun, 07 Oct 2007 04:38:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/10/07/915969.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/915969.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/10/07/915969.html#Feedback</comments><slash:comments>26</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/915969.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/915969.html</trackback:ping><description><![CDATA[摘要: 较之C# 2.0, C# 3.x引入了一些列新的特性，为我们编程带来很大的便利，通过有效地利用这些新特性，我们可以编写出更加简洁、优雅的程序。不过这些新特性仅仅是编译器给我们耍的小花招：在编译的时候加入一些必要的Code，使这些在C# 2.0角度看略显残缺的Code变得“完整”，实际上最终生成的Assembly和在C# 2.0时代并没有本质的不同。为此，有些人对这些新特性不以为然，觉得仅仅是一些表面文章，是鸡肋。但是我的观点是：既然这些特性能给我们的编程带来便利，干嘛不用呢？&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/10/07/915969.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/915969.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]深入理解C#3.x的新特性（4）：Automatically Implemented Property</title><link>http://www.cnblogs.com/artech/archive/2007/09/15/894270.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sat, 15 Sep 2007 13:07:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/09/15/894270.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/894270.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/09/15/894270.html#Feedback</comments><slash:comments>30</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/894270.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/894270.html</trackback:ping><description><![CDATA[摘要: 深入理解C#3.x的新特性系列在沉寂一个月之后，今天继续。在本系列前3部分中，我们分别讨论了<a style="color:red" href="http://www.cnblogs.com/artech/archive/2007/07/15/818980.html" target="_blank">Anonymous Type</a>，<a style="color:red" href="http://www.cnblogs.com/artech/archive/2007/07/18/821881.html" target="_blank">Extension Method </a>和 <a style="color:red" href="http://www.cnblogs.com/artech/archive/2007/08/22/865247.html" target="_blank">Lambda Expression</a>，今天我们来讨论另一个实用的、有意思的New feature: <b>Automatically Implemented Property</b>。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/09/15/894270.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/894270.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]深入理解C# 3.x的新特性(3)：从Delegate、Anonymous Method到Lambda Expression</title><link>http://www.cnblogs.com/artech/archive/2007/08/22/865247.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Wed, 22 Aug 2007 05:44:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/08/22/865247.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/865247.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/08/22/865247.html#Feedback</comments><slash:comments>26</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/865247.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/865247.html</trackback:ping><description><![CDATA[摘要: 继上一章，介绍<a href="http://www.cnblogs.com/artech/archive/2007/07/18/821881.html" target="_blank">Extension Method</a>之后，我们接着来介绍另一个重要的特性：Lambda Expression。在前面的两篇文章中，我一再在强调这样的一个概念：C# 3.x新引入的这些特性仅仅反映在Programming Language和相应的Compiler层面。通过编译生成的Assembly的IL和原来并没有本质的改变。从这个意义上讲，所有的这些其实是编译器给我们玩得障眼法而已。Lambda Expression也不例外， Lambda Expression就是一个Anonymous Delegate，无论是Named Delegate也好、Anonymous Delegate也好，其本质也就是一个Delegate。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/08/22/865247.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/865247.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]What is "Type" in managed heap?</title><link>http://www.cnblogs.com/artech/archive/2007/06/04/769805.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sun, 03 Jun 2007 19:50:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/06/04/769805.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/769805.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/06/04/769805.html#Feedback</comments><slash:comments>32</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/769805.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/769805.html</trackback:ping><description><![CDATA[摘要: 我们知道，在程序运行过程中，每个对象（object）都是对应了一块内存，这里的对象不仅仅指的是某个具体类型的实例（instance），也包括类型（type）本身。我想大家也很清楚 CLR如何为我们创建一个类型的实例（instance）的：CLR计算即将被创建的Instance的size（所有的字段加上额外的成员所占的空间： TypeHandle和SyncBlockIndex）；在当前AppDomain对应的managed heap中为之开辟一块连续的内存空间；初始化Instance的这两个额外的成员TypeHandle和SyncBlockIndex ；最后调用对应的constructor。<br><br>在面向对象的原则下，Instance的 Field代表的是对象的状态（state）, 而方法则体现的是对象的行为（behavior）。状态只能和具体的Instance绑定在一起，而属于同一类型的不同的Instance则具有一样的行为，所以行为是和Type绑定在一起的。同时Type定义了很多原数据的信息。这些基于Type的信息是如何保存的，今天我们就来简单地讨论这个问题。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/06/04/769805.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/769805.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]再说String</title><link>http://www.cnblogs.com/artech/archive/2007/05/31/765773.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Wed, 30 May 2007 16:54:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/05/31/765773.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/765773.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/05/31/765773.html#Feedback</comments><slash:comments>37</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/765773.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/765773.html</trackback:ping><description><![CDATA[摘要: 在前两个月的时间内，我在园子里发表的两片介绍字符串的恒定性的文章：《字符串的驻留（String Interning）》和《深入理解string和如何高效地使用string》。前几天Anytao在他的《品味类型---值类型与引用类型（中）－规则无边》的文章中，针对字符串的恒定性展开了很好的讨论，昨天首页上又出现了亚历山大同志的讨论性质的帖子《关于String的终极解释》。大家已经讨论得很完备了，在这里我只是根据我自己的理解对此作一些补充。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/05/31/765773.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/765773.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]如何改善Managed Code的Performance和Scalability系列之二：深入理解string和如何高效地使用string</title><link>http://www.cnblogs.com/artech/archive/2007/05/06/737130.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sun, 06 May 2007 07:30:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/05/06/737130.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/737130.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/05/06/737130.html#Feedback</comments><slash:comments>40</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/737130.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/737130.html</trackback:ping><description><![CDATA[摘要: 无论你所使用的是哪种编程语言，我们都不得不承认这样一个共识：string是我们使用最为频繁的一种对象。但是string的常用性并不意味着它的简单性，而且我认为，正是由于string的频繁使用才会促使其设计人员在string的设计上花大量的功夫。所以正是这种你天天见面的string，蕴含了很多精妙的设计思想。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/05/06/737130.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/737130.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]如何改善Managed Code的Performance和Scalability系列之一：由for V.S. for each想到的</title><link>http://www.cnblogs.com/artech/archive/2007/05/02/734636.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Wed, 02 May 2007 11:25:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/05/02/734636.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/734636.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/05/02/734636.html#Feedback</comments><slash:comments>40</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/734636.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/734636.html</trackback:ping><description><![CDATA[摘要: 一直想写一系列如何提高Performance和Scalability的文章，把我的相关经验和所知道的相关的技巧同大家分享。前一阵在园子里有一篇讨论for each 和 for两种循环那个具有更好的performance的blog，议论得沸沸扬扬。我觉得这是一个很好的切入点，我就已此作为引子，开始我的这个系列的文章。这篇文章的重点不是在于比较这两种循环孰优孰劣，我将讨论的重点是如何更好地定义Collection，如何在判断在什么时候该用Array，什么时候用Collection。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/05/02/734636.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/734636.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我所理解的Remoting（2）：远程对象生命周期的管理—Part I</title><link>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Thu, 22 Mar 2007 07:56:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/684154.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/22/684154.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/684154.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/684154.html</trackback:ping><description><![CDATA[摘要: 在.NET中提到对象的生命周期，我们会不由自主地想到CLR的垃圾回收。在运行一个.NET程序过程中，我们通过某种方式，比如通过new操作符，通过反序列化，通过反射机制，创建一个对象，CLR在为这个对象在托管堆中开辟一块内存空间。随着程序的运行，创建的对象越来越多，托管堆中的可用的内存越来越少，必须有一种机制来判断被分配在托管堆中的对象那些已经不被使用，以及进行对这些对象占用的内存进行回收。这种机制被称为CLR自动内存管理，也就是我们常说的垃圾回收。为了说清楚远程对象的生命周期管理，我们 得首先了解本地对象的生命周期。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/22/684154.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/684154.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创].NET Framework:用Coding证明Application Domain的隔离性</title><link>http://www.cnblogs.com/artech/archive/2007/03/05/664825.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 05 Mar 2007 15:58:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/05/664825.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/664825.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/05/664825.html#Feedback</comments><slash:comments>36</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/664825.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/664825.html</trackback:ping><description><![CDATA[摘要: Application Domain可以看作是一个Assembly的逻辑容器。在程序执行过程中，如果遇到需要的Type并没有定义在已经加载的Assemblies中，CLR会把相应的Assembly加载的该Application Domain中。每个Application Domain都有一个属于自己的加载器堆（Loader Heap），用于维护从Application Domain创建以后所用到的所有的Type，以及这些Type对应的方法表——维护这样一个Mapping：定义在Type中的所有方法和经过JIT编译后x86代码（只考虑32bit处理器）。

Application Domain之间是相互隔离，互不干扰。在一个Application Domain创建的对象不能被另一个Application Domain直接调用，反映在内存分配上面——就是各个Application Domain使用各个独立的内存地址空间。一个对象根据他所对应的类型（如System.MarshalByRefObject通过传递引用的方式）或者属性（比如对于定义了System. Serializ&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/05/664825.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/664825.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创].Net Framework: 字符串的驻留（String Interning）</title><link>http://www.cnblogs.com/artech/archive/2007/03/04/663728.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sun, 04 Mar 2007 15:03:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/04/663728.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/663728.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/04/663728.html#Feedback</comments><slash:comments>41</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/663728.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/663728.html</trackback:ping><description><![CDATA[摘要: 关于字符串的驻留的机制，对于那些了解它的人肯定会认为很简单，但是我相信会有很大一部分人对它存在迷惑。在开始关于字符串的驻留之前，先给出一个有趣的Sample...&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/04/663728.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/663728.html?type=1" width = "1" height = "1" />]]></description></item></channel></rss>