<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Michael C. Kennedy's Weblog</title>
    <link>http://www.michaelckennedy.net/blog/</link>
    <description>.NET and Agile Software Design</description>
    <language>en-us</language>
    <copyright>Michael C. Kennedy</copyright>
    <lastBuildDate>Wed, 02 Jul 2008 18:08:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>mkennedy@unitedbinary.com</managingEditor>
    <webMaster>mkennedy@unitedbinary.com</webMaster>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=adbc22e0-e1c2-4987-a908-f040d75a8528</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,adbc22e0-e1c2-4987-a908-f040d75a8528.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,adbc22e0-e1c2-4987-a908-f040d75a8528.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=adbc22e0-e1c2-4987-a908-f040d75a8528</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">When I talk about LINQ people often ask
whether it’s possible to have dynamic queries with LINQ. An example of this is presenting
the user with a UI that allows them to optionally filter by some criteria or other
and sort by some criteria. This was straightforward if you built-up a SQL string in
code.<br /><br />
The compiled, static nature of LINQ makes this appear difficult at first. They are
not and this video and sample application shows you how to accomplish just this.<br /><p></p><blockquote><img src="http://www.michaelckennedy.net/blog/content/binary/DynamicLinqScreenShot.jpg" border="0" /><br />
                       
Screen shot of sample application<br /><br /></blockquote><link rel="File-List" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" /><link rel="themeData" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" /><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" /><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:DontVertAlignCellWithSp/>
   <w:DontBreakConstrainedForcedTables/>
   <w:DontVertAlignInTxbx/>
   <w:Word11KerningPairs/>
   <w:CachedColBalance/>
  </w:Compatibility>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]--><style><!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--></style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;}
</style>
<![endif]--><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;">You
can download the source code here</span>:<br /><br />
           <a href="http://www.michaelckennedy.net/blog/content/binary/Kennedy-Dynamic-Linq.zip">Kennedy-Dynamic-Linq.zip
(88.34 KB)</a><br /><br />
And you can watch the screencast video here:<br /><br />
          <a href="http://www.michaelckennedy.net/Downloads/videos/Kennedy-Dynamic-Linq.wmv">Kennedy-Dynamic-Linq.wmv
(35.7 MB)</a><br /><br />
Of course, if you like this post, please kick it: <a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2cadbc22e0-e1c2-4987-a908-f040d75a8528.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2cadbc22e0-e1c2-4987-a908-f040d75a8528.aspx" border="0" alt="kick it on DotNetKicks.com" /></a><br /><br /><br /><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=adbc22e0-e1c2-4987-a908-f040d75a8528" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Dynamic Data Access with LINQ</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,adbc22e0-e1c2-4987-a908-f040d75a8528.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,adbc22e0-e1c2-4987-a908-f040d75a8528.aspx</link>
      <pubDate>Wed, 02 Jul 2008 18:08:00 GMT</pubDate>
      <description>When I talk about LINQ people often ask whether it’s possible to have dynamic queries with LINQ. An example of this is presenting the user with a UI that allows them to optionally filter by some criteria or other and sort by some criteria. This was straightforward if you built-up a SQL string in code.&lt;br&gt;
&lt;br&gt;
The compiled, static nature of LINQ makes this appear difficult at first. They are
not and this video and sample application shows you how to accomplish just this.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;blockquote&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/DynamicLinqScreenShot.jpg" border="0"&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Screen shot of sample application&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;link rel="File-List" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;
&lt;link rel="themeData" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;
&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cmkennedy%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:DontVertAlignCellWithSp/&gt;
   &lt;w:DontBreakConstrainedForcedTables/&gt;
   &lt;w:DontVertAlignInTxbx/&gt;
   &lt;w:Word11KerningPairs/&gt;
   &lt;w:CachedColBalance/&gt;
  &lt;/w:Compatibility&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val="Cambria Math"/&gt;
   &lt;m:brkBin m:val="before"/&gt;
   &lt;m:brkBinSub m:val="&amp;#45;-"/&gt;
   &lt;m:smallFrac m:val="off"/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val="0"/&gt;
   &lt;m:rMargin m:val="0"/&gt;
   &lt;m:defJc m:val="centerGroup"/&gt;
   &lt;m:wrapIndent m:val="1440"/&gt;
   &lt;m:intLim m:val="subSup"/&gt;
   &lt;m:naryLim m:val="undOvr"/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267"&gt;
  &lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/&gt;
  &lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 7"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 8"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" Name="toc 9"/&gt;
  &lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/&gt;
  &lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/&gt;
  &lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/&gt;
  &lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/&gt;
  &lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/&gt;
  &lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/&gt;
  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/&gt;
  &lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/&gt;
  &lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/&gt;
  &lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/&gt;
  &lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/&gt;
  &lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/&gt;
  &lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/&gt;
  &lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/&gt;
  &lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/&gt;
  &lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/&gt;
  &lt;w:LsdException Locked="false" Priority="37" Name="Bibliography"/&gt;
  &lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;
&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;span style="font-size: 11pt; line-height: 115%; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;You
can download the source code here&lt;/span&gt;:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.michaelckennedy.net/blog/content/binary/Kennedy-Dynamic-Linq.zip"&gt;Kennedy-Dynamic-Linq.zip
(88.34 KB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
And you can watch the screencast video here:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.michaelckennedy.net/Downloads/videos/Kennedy-Dynamic-Linq.wmv"&gt;Kennedy-Dynamic-Linq.wmv
(35.7 MB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Of course, if you like this post, please kick it: &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2cadbc22e0-e1c2-4987-a908-f040d75a8528.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2cadbc22e0-e1c2-4987-a908-f040d75a8528.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=adbc22e0-e1c2-4987-a908-f040d75a8528" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,adbc22e0-e1c2-4987-a908-f040d75a8528.aspx</comments>
      <category>DevelopMentor</category>
      <category>Talks</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=11caa15a-b9f2-4adb-a1d8-10ab0425b55f</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=11caa15a-b9f2-4adb-a1d8-10ab0425b55f</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Do you watch a lot of video on your computer?
I sure do. I download conference talks and interviews. I especially watch a lot of
TV recorded by my Windows Media Center PC by copying the video files to my laptop.
Media Center is SO much better than TiVo because you can copy / transfer / save video
to other places (like your laptop).<br /><p></p><div align="center"><img src="http://www.michaelckennedy.net/blog/content/binary/mcesetup.jpg" border="0" /><br />
A cool Media Center Setup (love it!)<br /></div><br />
That’s all well and good, except I really miss the ability to skip commercials and
pause video via my media center remote control.<br /><br /><div align="center"><img src="http://www.michaelckennedy.net/blog/content/binary/MCERemote.jpg" border="0" /><br />
Media Center Remote (love this too!)<br /></div><br />
That’s been a pain to say the least inside Windows Media Player. Well goodbye days
of frustrating commercials and TV via the mouse!<br /><br /><b>Introducing “Minimalist TV Player” (by me!):</b><br /><br /><div align="center"><img src="http://www.michaelckennedy.net/blog/content/binary/Screen.jpg" border="0" /><br /></div><br />
It looks like Windows Media Player and has the same basic features for playing video. 
<br /><br />
But – you can control it like a Media Center TV to <u>skip commercials and replay
an action scene</u> (like the crash shown above at the last Indy 500, just jump back
15 seconds to see the replay)!<br /><br />
You can use the keys PageUp to jump back 15 seconds and PageDown to skip commercials
(forward 30 seconds). That’s a good start. But, if you have one of these presentation
remotes: 
<br /><br /><div align="center"><img src="http://www.michaelckennedy.net/blog/content/binary/presentation_remote_thumb.jpg" border="0" /><br />
Wireless presentation remote 
<br />
(approx $39)<br /></div><br />
Then you can use it to control the TV Player like a Media Center Remote! Here’s the
control mapping:<br /><br /><br /><div align="center"><img src="http://www.michaelckennedy.net/blog/content/binary/presentation_remote_controls.jpg" border="0" /><br />
Controls for the TV Player<br /></div><br />
Now you have the same controls as your Media Center PC on any computer that has Windows
Media Player installed! How cool is that?<br /><br />
Download the beta 1 version here:  <a href="http://www.michaelckennedy.com/Downloads/Tools/TVPlayer/MinimalistTVPlayer.zip">MinimalistTVPlayer
(128 KB)</a><br /><br />
This beta version is fully functional but will expire in 2009. The supported file
types depends somewhat on your system. The program will play any video files that
your Windows Media Player can play. This usually includes WMV, MPG, AVI, and possibly
DVR-MS files from Windows Media Center and DivX if you have the decoder installed.<br /><br />
One final tip: You can associate the application with your video file types and choose
“Open With” to directly launch the program from a file: 
<br /><br /><img src="http://www.michaelckennedy.net/blog/content/binary/AddToOpenWith.jpg" border="0" /><br /><br />
Just be careful to <b>not </b>set the TV Player as the default program to load your
video with unless that’s what you want.<br /><br />
If you this program, be sure to help promote it by kicking it! <a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx" alt="kick it on DotNetKicks.com" border="0" /></a><br /><br />
[Update June 5, 2008: I'm working on a <a href="http://services.michaelckennedy.net/Files/beta2.png" target="_blank">much
slicker UI</a> which I'll try to get out soon.]<br /><br /><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=11caa15a-b9f2-4adb-a1d8-10ab0425b55f" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Commercial Skip and Instant Replay for Any Computer (Not Just Media Center Anymore)</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx</link>
      <pubDate>Mon, 02 Jun 2008 12:43:35 GMT</pubDate>
      <description>Do you watch a lot of video on your computer? I sure do. I download conference talks and interviews. I especially watch a lot of TV recorded by my Windows Media Center PC by copying the video files to my laptop. Media Center is SO much better than TiVo because you can copy / transfer / save video to other places (like your laptop).&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div align="center"&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/mcesetup.jpg" border="0"&gt;
&lt;br&gt;
A cool Media Center Setup (love it!)&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
That’s all well and good, except I really miss the ability to skip commercials and
pause video via my media center remote control.&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/MCERemote.jpg" border="0"&gt;
&lt;br&gt;
Media Center Remote (love this too!)&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
That’s been a pain to say the least inside Windows Media Player. Well goodbye days
of frustrating commercials and TV via the mouse!&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Introducing “Minimalist TV Player” (by me!):&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/Screen.jpg" border="0"&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
It looks like Windows Media Player and has the same basic features for playing video. 
&lt;br&gt;
&lt;br&gt;
But – you can control it like a Media Center TV to &lt;u&gt;skip commercials and replay
an action scene&lt;/u&gt; (like the crash shown above at the last Indy 500, just jump back
15 seconds to see the replay)!&lt;br&gt;
&lt;br&gt;
You can use the keys PageUp to jump back 15 seconds and PageDown to skip commercials
(forward 30 seconds). That’s a good start. But, if you have one of these presentation
remotes: 
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/presentation_remote_thumb.jpg" border="0"&gt;
&lt;br&gt;
Wireless presentation remote 
&lt;br&gt;
(approx $39)&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
Then you can use it to control the TV Player like a Media Center Remote! Here’s the
control mapping:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="http://www.michaelckennedy.net/blog/content/binary/presentation_remote_controls.jpg" border="0"&gt;
&lt;br&gt;
Controls for the TV Player&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
Now you have the same controls as your Media Center PC on any computer that has Windows
Media Player installed! How cool is that?&lt;br&gt;
&lt;br&gt;
Download the beta 1 version here:&amp;nbsp; &lt;a href="http://www.michaelckennedy.com/Downloads/Tools/TVPlayer/MinimalistTVPlayer.zip"&gt;MinimalistTVPlayer
(128 KB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
This beta version is fully functional but will expire in 2009. The supported file
types depends somewhat on your system. The program will play any video files that
your Windows Media Player can play. This usually includes WMV, MPG, AVI, and possibly
DVR-MS files from Windows Media Center and DivX if you have the decoder installed.&lt;br&gt;
&lt;br&gt;
One final tip: You can associate the application with your video file types and choose
“Open With” to directly launch the program from a file: 
&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.michaelckennedy.net/blog/content/binary/AddToOpenWith.jpg" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
Just be careful to &lt;b&gt;not &lt;/b&gt;set the TV Player as the default program to load your
video with unless that’s what you want.&lt;br&gt;
&lt;br&gt;
If you this program, be sure to help promote it by kicking it! &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
[Update June 5, 2008: I'm working on a &lt;a href="http://services.michaelckennedy.net/Files/beta2.png" target="_blank"&gt;much
slicker UI&lt;/a&gt; which I'll try to get out soon.]&lt;br&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=11caa15a-b9f2-4adb-a1d8-10ab0425b55f" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,11caa15a-b9f2-4adb-a1d8-10ab0425b55f.aspx</comments>
      <category>Tools</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=859d9d70-e822-418f-820c-ca91bed78dcf</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,859d9d70-e822-418f-820c-ca91bed78dcf.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,859d9d70-e822-418f-820c-ca91bed78dcf.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=859d9d70-e822-418f-820c-ca91bed78dcf</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">There appears to be some confusion about
this .NET 2.0 SP1 ThreadPool bug I found. Can you believe <a target="_blank" href="http://www.xkcd.com/386/">someone
might be wrong on the internet</a>?<br /><br />
If you’ve been following the posts (<a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx">1</a>, <a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx">2</a>, <a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx">3</a>),
then you’ll know I was in touch with the key guys at Microsoft and the root of the
problem is that if you create asynchronous work faster than the ThreadPool can create
threads, then that work "misses" the SetMinThreads command and are created more slowly.<br /><br />
That is why the Thread.Sleep(1) probably solves the issue for you. If it doesn’t,
sleep slightly longer. It’s a timing issue.<br /><br />
With this insight, you’ll see that this does not really affect true servers such as
ASP.NET and WCF but does affect things like Delegate.BeginInvoke and friends called
in quick succession. 
<br /><br />
In short, if your server handles more than 1,000 requests per second, during the first
second of startup, then your server may run into this problem (ok, ok, more precisely,
if your server handles more than 1 request / millisecond).<br /><br />
Let me address a few common concerns out there:<br /><ul><li>
Is the sky falling? No.</li><li>
Is it great situation? No.</li><li>
Will be fixed with .NET 2.0 SP2? Yes</li><li>
When? Maybe this summer, maybe later - they aren’t sure.</li><li>
Does this affect WCF and ASP.NET? Probably not. <a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx">The
bug</a>, no. The <a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,55a9b21e-ae85-4c24-a0b6-63dff4a6b491.aspx">new
ThreadPool behavior</a>, yes.</li><li>
Is there a work around? Yes, create threads more slowly. This is automatic on the
server.</li></ul><p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c859d9d70-e822-418f-820c-ca91bed78dcf.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c859d9d70-e822-418f-820c-ca91bed78dcf.aspx" alt="kick it on DotNetKicks.com" border="0" /></a></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=859d9d70-e822-418f-820c-ca91bed78dcf" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>More on the ThreadPool Bug in .NET 2.0 SP1</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,859d9d70-e822-418f-820c-ca91bed78dcf.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,859d9d70-e822-418f-820c-ca91bed78dcf.aspx</link>
      <pubDate>Thu, 17 Apr 2008 16:31:28 GMT</pubDate>
      <description>There appears to be some confusion about this .NET 2.0 SP1 ThreadPool bug I found. Can you believe &lt;a target="_blank" href="http://www.xkcd.com/386/"&gt;someone
might be wrong on the internet&lt;/a&gt;?&lt;br&gt;
&lt;br&gt;
If you’ve been following the posts (&lt;a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx"&gt;1&lt;/a&gt;, &lt;a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx"&gt;2&lt;/a&gt;, &lt;a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx"&gt;3&lt;/a&gt;),
then you’ll know I was in touch with the key guys at Microsoft and the root of the
problem is that if you create asynchronous work faster than the ThreadPool can create
threads, then that work "misses" the SetMinThreads command and are created more slowly.&lt;br&gt;
&lt;br&gt;
That is why the Thread.Sleep(1) probably solves the issue for you. If it doesn’t,
sleep slightly longer. It’s a timing issue.&lt;br&gt;
&lt;br&gt;
With this insight, you’ll see that this does not really affect true servers such as
ASP.NET and WCF but does affect things like Delegate.BeginInvoke and friends called
in quick succession. 
&lt;br&gt;
&lt;br&gt;
In short, if your server handles more than 1,000 requests per second, during the first
second of startup, then your server may run into this problem (ok, ok, more precisely,
if your server handles more than 1 request / millisecond).&lt;br&gt;
&lt;br&gt;
Let me address a few common concerns out there:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Is the sky falling? No.&lt;/li&gt;
&lt;li&gt;
Is it great situation? No.&lt;/li&gt;
&lt;li&gt;
Will be fixed with .NET 2.0 SP2? Yes&lt;/li&gt;
&lt;li&gt;
When? Maybe this summer, maybe later - they aren’t sure.&lt;/li&gt;
&lt;li&gt;
Does this affect WCF and ASP.NET? Probably not. &lt;a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx"&gt;The
bug&lt;/a&gt;, no. The &lt;a target="_blank" href="http://www.michaelckennedy.net/blog/PermaLink,guid,55a9b21e-ae85-4c24-a0b6-63dff4a6b491.aspx"&gt;new
ThreadPool behavior&lt;/a&gt;, yes.&lt;/li&gt;
&lt;li&gt;
Is there a work around? Yes, create threads more slowly. This is automatic on the
server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c859d9d70-e822-418f-820c-ca91bed78dcf.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c859d9d70-e822-418f-820c-ca91bed78dcf.aspx" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=859d9d70-e822-418f-820c-ca91bed78dcf" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,859d9d70-e822-418f-820c-ca91bed78dcf.aspx</comments>
      <category>DevelopMentor</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=bbaa3ddd-0b26-4159-9902-404080a115fa</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,bbaa3ddd-0b26-4159-9902-404080a115fa.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,bbaa3ddd-0b26-4159-9902-404080a115fa.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bbaa3ddd-0b26-4159-9902-404080a115fa</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">You may have heard that the sessions for
Mix 08 were posted online and you can <a href="http://sessions.visitmix.com/" target="_blank">view
or download them</a> until your heart is content.<br /><br /><a href="http://www.visitmix.com/" target="_blank">Mix 08</a> is becoming an increasingly
important event in the .NET space. I spent a fair amount of time watching the sessions
in the evenings. I was teaching a class and couldn't attend myself. 
<br /><br />
So who wouldn't want to curl up with a cold beer, a warm laptop, and a bunch of .NET
presentations? That's what I want to know. But, maybe you don't have time to go through
all 89 sessions? Don't despair, I'll distill them down for you. 
<br /><br />
BTW, I'd love to link directly to them, but SilverLight and Flash are broken web metaphors
(you can't link their content) so you'll have to find them at <a href="http://sessions.visitmix.com/" target="_blank">http://sessions.visitmix.com/</a>.<br /><br />
Without further ado, I present to you my top 5 most important sessions from Mix 08:<br /><br /><ol><li>
T22 - Developing ASP.NET Applications Using the Model View Controller Pattern<br /><a href="http://www.hanselman.com/blog/" target="_blank">Scott Hanselman</a><br /><br /></li><li>
T01 - Creating a RESTful API with Windows Communication Foundation<br />
Aaron Sloman and Haider Sabri<br /><br /></li><li>
UX03 - The Back of the Napkin: Solving Design Problems (and Selling Your Solutions)
with Pictures<br /><a href="http://www.digitalroam.typepad.com/" target="_blank">Dan Roam</a><br /><br /></li><li>
T11 - What's New in Windows Presentation Foundation 3.5<br /><a href="http://rrelyea.spaces.live.com/" target="_blank">Rob Relyea</a><br /><br /></li><li>
T26 - Building Applicaitons and Services with.NET Framework 3.5<br /><a href="http://www.wintellect.com/cs/blogs/jsmith/" target="_blank">Justin Smith</a></li></ol>
Of course the keynotes were great too - but they don't really belong in this category.<br /><br />
So get out there and learn something! :) And kick it if you like it: <a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2f" alt="kick it on DotNetKicks.com" border="0" /></a><br /><br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=bbaa3ddd-0b26-4159-9902-404080a115fa" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Top 5 Most Important Sessions from Mix 08 (with Video)</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,bbaa3ddd-0b26-4159-9902-404080a115fa.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,bbaa3ddd-0b26-4159-9902-404080a115fa.aspx</link>
      <pubDate>Fri, 04 Apr 2008 14:16:07 GMT</pubDate>
      <description>You may have heard that the sessions for Mix 08 were posted online and you can &lt;a href="http://sessions.visitmix.com/" target="_blank"&gt;view
or download them&lt;/a&gt; until your heart is content.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.visitmix.com/" target="_blank"&gt;Mix 08&lt;/a&gt; is becoming an increasingly
important event in the .NET space. I spent a fair amount of time watching the sessions
in the evenings. I was teaching a class and couldn't attend myself. 
&lt;br&gt;
&lt;br&gt;
So who wouldn't want to curl up with a cold beer, a warm laptop, and a bunch of .NET
presentations? That's what I want to know. But, maybe you don't have time to go through
all 89 sessions? Don't despair, I'll distill them down for you. 
&lt;br&gt;
&lt;br&gt;
BTW, I'd love to link directly to them, but SilverLight and Flash are broken web metaphors
(you can't link their content) so you'll have to find them at &lt;a href="http://sessions.visitmix.com/" target="_blank"&gt;http://sessions.visitmix.com/&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Without further ado, I present to you my top 5 most important sessions from Mix 08:&lt;br&gt;
&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
T22 - Developing ASP.NET Applications Using the Model View Controller Pattern&lt;br&gt;
&lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;Scott Hanselman&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
T01 - Creating a RESTful API with Windows Communication Foundation&lt;br&gt;
Aaron Sloman and Haider Sabri&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
UX03 - The Back of the Napkin: Solving Design Problems (and Selling Your Solutions)
with Pictures&lt;br&gt;
&lt;a href="http://www.digitalroam.typepad.com/" target="_blank"&gt;Dan Roam&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
T11 - What's New in Windows Presentation Foundation 3.5&lt;br&gt;
&lt;a href="http://rrelyea.spaces.live.com/" target="_blank"&gt;Rob Relyea&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
T26 - Building Applicaitons and Services with.NET Framework 3.5&lt;br&gt;
&lt;a href="http://www.wintellect.com/cs/blogs/jsmith/" target="_blank"&gt;Justin Smith&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
Of course the keynotes were great too - but they don't really belong in this category.&lt;br&gt;
&lt;br&gt;
So get out there and learn something! :) And kick it if you like it: &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2f" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=bbaa3ddd-0b26-4159-9902-404080a115fa" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,bbaa3ddd-0b26-4159-9902-404080a115fa.aspx</comments>
      <category>Talks</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=f7710633-f518-49f4-a018-4968dc57db26</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,f7710633-f518-49f4-a018-4968dc57db26.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,f7710633-f518-49f4-a018-4968dc57db26.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f7710633-f518-49f4-a018-4968dc57db26</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been looking around <a href="http://www.codeplex.com">CodePlex </a>lately
and there's some really cool stuff there. For example, the source code to ASP.NET
MVC.<br /><br />
That got me thinking, what else is out there? Here are my (current) top 5 favorite
CodePlex projects.<br /><br /><b>#1. ASP.NET MVC</b><br /><a href="http://www.codeplex.com/aspnet">http://www.codeplex.com/aspnet</a><br />
This project gives you access to the source code for upcoming releases that the Microsoft
ASP.NET team is working on, starting with the ASP.NET MVC Framework. The project gives
you a look at the design and lets you have a voice in it. You can send us feedback
for the ASP.NET MVC framework through the ASP.NET MVC forums on the ASP.NET site. 
<br /><br /><b>#2 Script#</b><br /><a href="http://www.codeplex.com/scriptsharp">http://www.codeplex.com/scriptsharp</a><br />
Script# enables more productive Ajax application development by allowing you to compile
your C# source code into JavaScript. It allows you to use standard .NET tools like
msbuild projects, Visual Studio and IDE intellisense, reflector, refactoring tools,
amongst various others. 
<br /><br /><b>#3 AJAX Control Toolkit</b><br /><a href="http://www.codeplex.com/AtlasControlToolkit">http://www.codeplex.com/AtlasControlToolkit</a><br />
The AJAX Control Toolkit is a joint project between the community and Microsoft. Built
upon the ASP.NET 2.0 AJAX Extensions, the Toolkit aims to be the biggest and best
collection of web-client components available.<br /><br /><b>#4 .NET Mass Downloader</b><br /><a href="http://www.codeplex.com/NetMassDownloader">http://www.codeplex.com/NetMassDownloader</a><br />
Mass Downloader For .Net Framework which allows you do download .Net Framework source
code in batch.<br />
The tool which enables offline debugging of .Net Framework in VS2008(including Express
Editions) , VS2005 (including Express Editions), and Codegear Rad Studio.<br /><br /><b>#5 MVC Contrib - MvcContrib.org</b><br /><a href="http://www.codeplex.com/MVCContrib">http://www.codeplex.com/MVCContrib</a><br />
This project will be a series of assemblies that add functionality to Microsoft's
ASP.NET MVC Framework and make the framework easier to use. *Download the MVC Framework
CTP here: <a href="http://asp.net/downloads/3.5-extensions/">http://asp.net/downloads/3.5-extensions/</a>.
Download here: <a href="http://go.microsoft.com/fwlink/?LinkID=105029">http://go.microsoft.com/fwlink/?LinkID=105029</a>.
Some of the items to be included are ...<br /><br /><b>#5+1 ASP.NET Upload Utility: Big Mailer</b><br /><a href="http://www.codeplex.com/bigmailer">http://www.codeplex.com/bigmailer</a><br />
Email something huge: The big mailer project allows you to upload large files to your
website and then retrieve a convenient url for email and other uses. 
<br /><br /><b>#5+2 Visual Studio Most Recent Files Utility</b><br /><a href="http://www.codeplex.com/vsrecentfiles">http://www.codeplex.com/vsrecentfiles</a><br />
Manage your recent projects and solutions list for Visual Studio. Supports VS 2003,
2005, and 2008. 
<br /><br /><i>[OK, those last two are projects are mine, but they are pretty cool.]</i><br /><br />
Did I miss something spectacular? Add it to the comments below!<br /><br />
- Michael Kennedy<br /><br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=f7710633-f518-49f4-a018-4968dc57db26" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Top 5 Favorite CodePlex Projects</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,f7710633-f518-49f4-a018-4968dc57db26.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,f7710633-f518-49f4-a018-4968dc57db26.aspx</link>
      <pubDate>Tue, 25 Mar 2008 13:43:14 GMT</pubDate>
      <description>I've been looking around &lt;a href="http://www.codeplex.com"&gt;CodePlex &lt;/a&gt;lately and
there's some really cool stuff there. For example, the source code to ASP.NET MVC.&lt;br&gt;
&lt;br&gt;
That got me thinking, what else is out there? Here are my (current) top 5 favorite
CodePlex projects.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#1. ASP.NET MVC&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/aspnet"&gt;http://www.codeplex.com/aspnet&lt;/a&gt;
&lt;br&gt;
This project gives you access to the source code for upcoming releases that the Microsoft
ASP.NET team is working on, starting with the ASP.NET MVC Framework. The project gives
you a look at the design and lets you have a voice in it. You can send us feedback
for the ASP.NET MVC framework through the ASP.NET MVC forums on the ASP.NET site. 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#2 Script#&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/scriptsharp"&gt;http://www.codeplex.com/scriptsharp&lt;/a&gt;
&lt;br&gt;
Script# enables more productive Ajax application development by allowing you to compile
your C# source code into JavaScript. It allows you to use standard .NET tools like
msbuild projects, Visual Studio and IDE intellisense, reflector, refactoring tools,
amongst various others. 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#3 AJAX Control Toolkit&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/AtlasControlToolkit"&gt;http://www.codeplex.com/AtlasControlToolkit&lt;/a&gt;
&lt;br&gt;
The AJAX Control Toolkit is a joint project between the community and Microsoft. Built
upon the ASP.NET 2.0 AJAX Extensions, the Toolkit aims to be the biggest and best
collection of web-client components available.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#4 .NET Mass Downloader&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/NetMassDownloader"&gt;http://www.codeplex.com/NetMassDownloader&lt;/a&gt;
&lt;br&gt;
Mass Downloader For .Net Framework which allows you do download .Net Framework source
code in batch.&lt;br&gt;
The tool which enables offline debugging of .Net Framework in VS2008(including Express
Editions) , VS2005 (including Express Editions), and Codegear Rad Studio.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#5 MVC Contrib - MvcContrib.org&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/MVCContrib"&gt;http://www.codeplex.com/MVCContrib&lt;/a&gt;
&lt;br&gt;
This project will be a series of assemblies that add functionality to Microsoft's
ASP.NET MVC Framework and make the framework easier to use. *Download the MVC Framework
CTP here: &lt;a href="http://asp.net/downloads/3.5-extensions/"&gt;http://asp.net/downloads/3.5-extensions/&lt;/a&gt;.
Download here: &lt;a href="http://go.microsoft.com/fwlink/?LinkID=105029"&gt;http://go.microsoft.com/fwlink/?LinkID=105029&lt;/a&gt;.
Some of the items to be included are ...&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#5+1 ASP.NET Upload Utility: Big Mailer&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/bigmailer"&gt;http://www.codeplex.com/bigmailer&lt;/a&gt;
&lt;br&gt;
Email something huge: The big mailer project allows you to upload large files to your
website and then retrieve a convenient url for email and other uses. 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;#5+2 Visual Studio Most Recent Files Utility&lt;/b&gt;
&lt;br&gt;
&lt;a href="http://www.codeplex.com/vsrecentfiles"&gt;http://www.codeplex.com/vsrecentfiles&lt;/a&gt;
&lt;br&gt;
Manage your recent projects and solutions list for Visual Studio. Supports VS 2003,
2005, and 2008. 
&lt;br&gt;
&lt;br&gt;
&lt;i&gt;[OK, those last two are projects are mine, but they are pretty cool.]&lt;/i&gt;
&lt;br&gt;
&lt;br&gt;
Did I miss something spectacular? Add it to the comments below!&lt;br&gt;
&lt;br&gt;
- Michael Kennedy&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=f7710633-f518-49f4-a018-4968dc57db26" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,f7710633-f518-49f4-a018-4968dc57db26.aspx</comments>
      <category>Open Source</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=4fadba49-e63b-4276-b373-0812faca96fb</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,4fadba49-e63b-4276-b373-0812faca96fb.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,4fadba49-e63b-4276-b373-0812faca96fb.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4fadba49-e63b-4276-b373-0812faca96fb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">If you'v been using my <a href="http://www.michaelckennedy.net/blog/PermaLink,guid,418ddbe1-bba5-4341-afc8-9fcb78bba6f5.aspx">Visual
Studio Recent Files Utility</a>, then you may be interested to find out that I just
released it as open source on CodePlex here.<br /><br />
    <a href="http://www.codeplex.com/vsrecentfiles">Visual Studio Recent
Files Utility on CodePlex</a><br /><br />
Enjoy!<br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=4fadba49-e63b-4276-b373-0812faca96fb" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Visual Studio Recent Files Utility Now OpenSource on CodePlex</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,4fadba49-e63b-4276-b373-0812faca96fb.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,4fadba49-e63b-4276-b373-0812faca96fb.aspx</link>
      <pubDate>Mon, 24 Mar 2008 23:06:27 GMT</pubDate>
      <description>If you'v been using my &lt;a href="http://www.michaelckennedy.net/blog/PermaLink,guid,418ddbe1-bba5-4341-afc8-9fcb78bba6f5.aspx"&gt;Visual
Studio Recent Files Utility&lt;/a&gt;, then you may be interested to find out that I just
released it as open source on CodePlex here.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.codeplex.com/vsrecentfiles"&gt;Visual Studio Recent
Files Utility on CodePlex&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
Enjoy!&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=4fadba49-e63b-4276-b373-0812faca96fb" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,4fadba49-e63b-4276-b373-0812faca96fb.aspx</comments>
      <category>Open Source</category>
      <category>Tools</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=8114c9a1-0d48-44a7-9841-25391ca14b5f</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,8114c9a1-0d48-44a7-9841-25391ca14b5f.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,8114c9a1-0d48-44a7-9841-25391ca14b5f.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8114c9a1-0d48-44a7-9841-25391ca14b5f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Hi All,<br /><br />
I recently added my <a href="http://www.michaelckennedy.net/blog/PermaLink,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx">Big
Mailer</a> project to CodePlex.<br /><br />
     <a href="http://www.codeplex.com/bigmailer">Big Mailer on
CodePlex</a><br /><br />
You can download the source code among other things.<br /><br />
Enjoy!<br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=8114c9a1-0d48-44a7-9841-25391ca14b5f" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Big Mailer Utility is Now Open Source on CodePlex</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,8114c9a1-0d48-44a7-9841-25391ca14b5f.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,8114c9a1-0d48-44a7-9841-25391ca14b5f.aspx</link>
      <pubDate>Mon, 24 Mar 2008 20:28:40 GMT</pubDate>
      <description>Hi All,&lt;br&gt;
&lt;br&gt;
I recently added my &lt;a href="http://www.michaelckennedy.net/blog/PermaLink,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx"&gt;Big
Mailer&lt;/a&gt; project to CodePlex.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.codeplex.com/bigmailer"&gt;Big Mailer on
CodePlex&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
You can download the source code among other things.&lt;br&gt;
&lt;br&gt;
Enjoy!&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=8114c9a1-0d48-44a7-9841-25391ca14b5f" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,8114c9a1-0d48-44a7-9841-25391ca14b5f.aspx</comments>
      <category>Open Source</category>
      <category>Tools</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=3c1f1434-99ea-4b94-9411-d6227c7af1f1</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3c1f1434-99ea-4b94-9411-d6227c7af1f1</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I often have to send large files around by email. For example, I had to email a colleague
a 10 MB file. It seems a little rude to hit him out of the blue with a 10 MB email.
I wanted something cleaner and less intrusive.
</p>
        <p>
So I created a simple utility I called "Big Mailer". I figured I'd blog about it and
share it with the world. Feel free to use it as you see fit. This program consists
of both a client and server piece that simplifies uploading content to your web site.
Then the program gives you a regular web link you can send via email. 
</p>
        <p>
Here's a screen shot:
</p>
        <p>
          <img style="border-width: 0px;" alt="BigMailer" src="http://www.michaelckennedy.net/blog/content/binary/BigMailer.png" border="0" />
        </p>
        <p>
You can download and install it via ClickOnce here:
</p>
        <blockquote>
          <p>
            <a href="http://www.michaelckennedy.net/downloads/tools/bigmailer/BigMailer.application">Install
Big Mailer</a> (700 KB)
</p>
        </blockquote>
        <p>
          <a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx">
            <img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx" alt="kick it on DotNetKicks.com" border="0" />
          </a>
        </p>
        <p>
You <u>must</u> have the following to use this program:
</p>
        <ol>
          <li>
            <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325FD-AE52-4E35-B531-508D977D32A6&amp;displaylang=en" target="_blank">.NET
3.5 Framework</a> installed on the client 
</li>
          <li>
            <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325FD-AE52-4E35-B531-508D977D32A6&amp;displaylang=en" target="_blank">.NET
3.5 Framework</a> on the server 
</li>
          <li>
An <a href="http://www.asp.net" target="_blank">ASP.NET web site</a> to host the WCF
service</li>
        </ol>
        <p>
After you install the client, click "Host Service" and you'll get the server side
code to drop onto your ASP.NET web site. There is a test web site with instructions
in that code.
</p>
        <p>
If you don't have an ASP.NET web site to host the service at you can always use public
services like <a href="http://www.dropboks.com" target="_blank">Drop Boks</a> (a great
service!) or other file sharing sites. The benefit of this program / service is that
you retain control of the files and you can conceivably send more sensitive content.
</p>
        <p>
You can also just use FTP if you have that for your web site, but I hate FTP personally.
I don't like fighting the firewall issues and I don't want it running on my servers.
</p>
        <p>
So this program allows you to upload content of unlimited size, without FTP, without
sending your files to a third party. Also, it sends everything in 16KB blocks, rather
than one giant http message. So you get the benefit of both being able to send huge
files (say 1 GB) and you get progress / cancel support.
</p>
        <p>
One feature that's notably lacking is authentication. I'll probably release an update
with security built-in. For now, take that into consideration before using it.
</p>
        <p>
Enjoy!
</p>
PS - This project is now <a href="http://www.codeplex.com/bigmailer">Open Source and
is host on CodePlex</a>.<br /><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=3c1f1434-99ea-4b94-9411-d6227c7af1f1" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Email Something Huge: Introducing the Big Mailer Utility</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx</link>
      <pubDate>Mon, 17 Mar 2008 17:52:54 GMT</pubDate>
      <description>&lt;p&gt;
I often have to send large files around by email. For example, I had to email a colleague
a 10 MB file. It seems a little rude to hit him out of the blue with a 10 MB email.
I wanted something cleaner and less intrusive.
&lt;/p&gt;
&lt;p&gt;
So I created a simple utility I called "Big Mailer". I figured I'd blog about it and
share it with the world. Feel free to use it as you see fit. This program consists
of both a client and server piece that simplifies uploading content to your web site.
Then the program gives you a regular web link you can send via email. 
&lt;/p&gt;
&lt;p&gt;
Here's a screen shot:
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-width: 0px;" alt="BigMailer" src="http://www.michaelckennedy.net/blog/content/binary/BigMailer.png" border="0"&gt;
&lt;/p&gt;
&lt;p&gt;
You can download and install it via ClickOnce here:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;a href="http://www.michaelckennedy.net/downloads/tools/bigmailer/BigMailer.application"&gt;Install
Big Mailer&lt;/a&gt; (700 KB)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You &lt;u&gt;must&lt;/u&gt; have the following to use this program:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en" target="_blank"&gt;.NET
3.5 Framework&lt;/a&gt; installed on the client 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en" target="_blank"&gt;.NET
3.5 Framework&lt;/a&gt; on the server 
&lt;/li&gt;
&lt;li&gt;
An &lt;a href="http://www.asp.net" target="_blank"&gt;ASP.NET web site&lt;/a&gt; to host the WCF
service&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
After you install the client, click "Host Service" and you'll get the server side
code to drop onto your ASP.NET web site. There is a test web site with instructions
in that code.
&lt;/p&gt;
&lt;p&gt;
If you don't have an ASP.NET web site to host the service at you can always use public
services like &lt;a href="http://www.dropboks.com" target="_blank"&gt;Drop Boks&lt;/a&gt; (a great
service!) or other file sharing sites. The benefit of this program / service is that
you retain control of the files and you can conceivably send more sensitive content.
&lt;/p&gt;
&lt;p&gt;
You can also just use FTP if you have that for your web site, but I hate FTP personally.
I don't like fighting the firewall issues and I don't want it running on my servers.
&lt;/p&gt;
&lt;p&gt;
So this program allows you to upload content of unlimited size, without FTP, without
sending your files to a third party. Also, it sends everything in 16KB blocks, rather
than one giant http message. So you get the benefit of both being able to send huge
files (say 1 GB) and you get progress / cancel support.
&lt;/p&gt;
&lt;p&gt;
One feature that's notably lacking is authentication. I'll probably release an update
with security built-in. For now, take that into consideration before using it.
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
PS - This project is now &lt;a href="http://www.codeplex.com/bigmailer"&gt;Open Source and
is host on CodePlex&lt;/a&gt;.&lt;br&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=3c1f1434-99ea-4b94-9411-d6227c7af1f1" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,3c1f1434-99ea-4b94-9411-d6227c7af1f1.aspx</comments>
      <category>Open Source</category>
      <category>Tools</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=f57cf127-7bf7-445e-bef4-14c3598f92eb</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f57cf127-7bf7-445e-bef4-14c3598f92eb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Here's a followup post on the .NET ThreadPool
bug that I described here:<br /><br /><a class="TitleLinkStyle" rel="bookmark" href="PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx">Breaking
Changes in the ThreadPool: The Movie</a><br /><br />
I have been in touch with the guys who are in charge of the ThreadPool and they have
both confirmed that this is a bug and that they are planning on fixing it in .NET
2.0 SP2 - but they are not sure of the timeline for its release.<br /><br />
In the meantime, Vance Morrison, a .NET Runtime Performance Architect at Microsoft,
has given me this work-around.<br /><br />
Take this "broken" code:<br /><br /><pre><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"> private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> UseThreadPool(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> count)<br />
        {<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">for</span> ( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> i <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> 0;
i &lt; count; i++ )<br />
            {<br />
                ThreadPool.QueueUserWorkItem(<br />
                    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">delegate</span> {
SlowMethod(); } );<br />
            }<br />
        }</span></pre>
And add a strategic Thread.Sleep and it's fixed:<br /><br /><pre><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"> private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> UseThreadPool(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> count)<br />
        {<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">for</span> ( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> i <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> 0;
i &lt; count; i++ )<br />
            {<br />
                ThreadPool.QueueUserWorkItem(<br />
                    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">delegate</span> {
SlowMethod(); } );<br />
Thread.Sleep(1);<br />
            }<br />
        }</span></pre><br /><br /><br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=f57cf127-7bf7-445e-bef4-14c3598f92eb" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Follow up on .NET 2.0 SP1 ThreadPool Bug</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx</link>
      <pubDate>Mon, 03 Mar 2008 19:49:40 GMT</pubDate>
      <description>Here's a followup post on the .NET ThreadPool bug that I described here:&lt;br&gt;
&lt;br&gt;
&lt;a class="TitleLinkStyle" rel="bookmark" href="PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx"&gt;Breaking
Changes in the ThreadPool: The Movie&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
I have been in touch with the guys who are in charge of the ThreadPool and they have
both confirmed that this is a bug and that they are planning on fixing it in .NET
2.0 SP2 - but they are not sure of the timeline for its release.&lt;br&gt;
&lt;br&gt;
In the meantime, Vance Morrison, a .NET Runtime Performance Architect at Microsoft,
has given me this work-around.&lt;br&gt;
&lt;br&gt;
Take this "broken" code:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt; private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; UseThreadPool(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;int&lt;/span&gt; count)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;for&lt;/span&gt; ( &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;int&lt;/span&gt; i &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; 0;
i &amp;lt; count; i++ )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadPool.QueueUserWorkItem(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;delegate&lt;/span&gt; {
SlowMethod(); } );&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/pre&gt;
And add a strategic Thread.Sleep and it's fixed:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt; private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; UseThreadPool(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;int&lt;/span&gt; count)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;for&lt;/span&gt; ( &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;int&lt;/span&gt; i &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; 0;
i &amp;lt; count; i++ )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadPool.QueueUserWorkItem(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;delegate&lt;/span&gt; {
SlowMethod(); } );&lt;br&gt;
Thread.Sleep(1);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=f57cf127-7bf7-445e-bef4-14c3598f92eb" /&gt;
&lt;br /&gt;
&lt;hr /&gt;All content copyright Michael C. Kennedy. All information, source code, and especially tools are provided as is and on a "use age your own risk" basis.</description>
      <comments>http://www.michaelckennedy.net/blog/CommentView,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx</comments>
      <category>DevelopMentor</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://www.michaelckennedy.net/blog/Trackback.aspx?guid=040a74fe-6ea5-46fb-b3cb-049030ffd8c3</trackback:ping>
      <pingback:server>http://www.michaelckennedy.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx</pingback:target>
      <dc:creator>Michael Kennedy</dc:creator>
      <wfw:comment>http://www.michaelckennedy.net/blog/CommentView,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx</wfw:comment>
      <wfw:commentRss>http://www.michaelckennedy.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=040a74fe-6ea5-46fb-b3cb-049030ffd8c3</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Well, my recent post on <a class="TitleLinkStyle" rel="bookmark" href="PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx">.NET
3.5 Brings BREAKING Changes to ThreadPool</a> sparked quite a bit of interest in the
.NET community.<br /><br />
But this is also something difficult to convince people of because it depends so heavily
on configuration. The source code doesn't change, the environment does.<br /><br />
So I've put together a screencast demonstrating the problem and elaborating further.
If you doubt the validity of the previous post, or can't reproduce the problem, please
watch the video:<br /><br /><br /><a href="http://www.michaelckennedy.net/Downloads/videos/KennedyFollowupNet35ThreadPool.wmv"><img src="http://www.michaelckennedy.net/blog/content/binary/VideoSnapshot.png" border="0" /></a><br /><br />
                     <a href="http://www.michaelckennedy.net/Downloads/videos/KennedyFollowupNet35ThreadPool.wmv">Download
the video</a> (approx 18 MB)<br /><br />
Kick it: <a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx" alt="kick it on DotNetKicks.com" border="0" /></a><br /><br />
In the video I work with a modified version of the program. Here's that for your enjoyment:<br /><br />
The application: <a href="http://www.michaelckennedy.net/blog/content/binary/NetThreading%20%28From%20Video%29.zip">NetThreading.exe
(From Video).zip (2.59 KB)</a><br /><br />
The source code:<br /><pre><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Threading;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> NewThreadPoolBehavior<br />
{<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">internal</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> Program<br />
    {<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> Main(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span>[]
args)<br />
        {<br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Running
on "</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> Environment.Version
);<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> w,
c;<br />
            ThreadPool.GetMaxThreads( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> w, <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> c
);<br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Max
Currently: "</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> w <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">",
"</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> c
);<br />
            ThreadPool.GetMinThreads( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> w, <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> c
);<br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Min
Currently: "</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> w <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">",
"</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> c
);<br /><br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Set
min thread count 20? (y/n) "</span> );<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> txt <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> Console.ReadLine();<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">if</span> (
txt == <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"y"</span> )<br />
            {<br />
                Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Setting
min to 20"</span> );<br />
                ThreadPool.SetMinThreads(
20, 100 );<br />
                ThreadPool.GetMinThreads( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> w, <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">out</span> c
);<br />
                Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Min
Currently: "</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> w <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">",
"</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> c
);<br />
            }<br />
            UseThreadPool(
200 );<br /><br />
            Console.ReadLine();<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span> DateTime
startTime;<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> UseThreadPool(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> count)<br />
        {<br />
            startTime <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> DateTime.Now;<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">for</span> ( <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> i <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> 0;
i &lt; count; i++ )<br />
            {<br />
                ThreadPool.QueueUserWorkItem(<br />
                    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">delegate</span> {
SlowMethod(); } );<br />
            }<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">int</span> concurrent <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> 0;<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">static</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> SlowMethod()<br />
        {<br />
            TimeSpan dt <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> DateTime.Now <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">-</span> startTime;<br />
            concurrent++;<br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Starting
ops ("</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> concurrent <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"
concurrent, elapsed="</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+<br /></span>dt.TotalSeconds.ToString( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"N3"</span> ) <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"
sec.) "</span> );<br />
            Thread.Sleep(
20000 );<br />
            Console.WriteLine( <span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Finished
ops ("</span><span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span> concurrent <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"
concurrent)"</span> );<br />
            concurrent--;<br />
        }<br />
    }<br />
}</span></pre><br /><p></p><img width="0" height="0" src="http://www.michaelckennedy.net/blog/aggbug.ashx?id=040a74fe-6ea5-46fb-b3cb-049030ffd8c3" /><br /><hr />
All content copyright Michael C. Kennedy. All information, source code, and especially
tools are provided as is and on a "use age your own risk" basis.</body>
      <title>Breaking Changes  in the ThreadPool: The Movie</title>
      <guid isPermaLink="false">http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx</guid>
      <link>http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx</link>
      <pubDate>Tue, 26 Feb 2008 18:21:04 GMT</pubDate>
      <description>Well, my recent post on &lt;a class="TitleLinkStyle" rel="bookmark" href="PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx"&gt;.NET
3.5 Brings BREAKING Changes to ThreadPool&lt;/a&gt; sparked quite a bit of interest in the
.NET community.&lt;br&gt;
&lt;br&gt;
But this is also something difficult to convince people of because it depends so heavily
on configuration. The source code doesn't change, the environment does.&lt;br&gt;
&lt;br&gt;
So I've put together a screencast demonstrating the problem and elaborating further.
If you doubt the validity of the previous post, or can't reproduce the problem, please
watch the video:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.michaelckennedy.net/Downloads/videos/KennedyFollowupNet35ThreadPool.wmv"&gt; &lt;img src="http://www.michaelckennedy.net/blog/content/binary/VideoSnapshot.png" border="0"&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.michaelckennedy.net/Downloads/videos/KennedyFollowupNet35ThreadPool.wmv"&gt;Download
the video&lt;/a&gt; (approx 18 MB)&lt;br&gt;
&lt;br&gt;
Kick it: &lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.michaelckennedy.net%2fblog%2fPermaLink%2cguid%2c040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
In the video I work with a modified version of the program. Here's that for your enjoyment:&lt;br&gt;
&lt;br&gt;
The application: &lt;a href="http://www.michaelckennedy.net/blog/content/binary/NetThreading%20%28From%20Video%29.zip"&gt;NetThreading.exe
(From Video).zip (2.59 KB)&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
The source code:&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Threading;&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;namespace&lt;/span&gt; NewThreadPoolBehavior&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;internal&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; Program&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;static&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; Main(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt;[]
args)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine( &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Running
on "&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; Environment.Version
);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;int&lt;/span&gt; w,
c;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadPool.GetMaxThreads( &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;out&lt;/span&gt; w, &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;out&lt;/span&gt; c
);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine( &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Max
Currently: "&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; w &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;",
"&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; c
);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadPool.GetMinThreads( &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;out&lt;/span&gt; w, &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;out&lt;/span&gt; c
);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine( &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Min
Currently: "&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; w &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;",
"&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; c
);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine( &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Set
min thread count 20? (y/n) "&lt;/span&gt; );&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; txt &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; Console.ReadLine();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;if&lt;/span&gt; (
txt == &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"y"&lt;/span&gt; )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Console.WriteLine( &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Setting
min to 20"&lt;/span&gt; );&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadPool.SetMinThreads(
20, 100 );&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&