<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET 3.5</title>
        <link>http://blogs.sftsrc.com/stuart/category/24.aspx</link>
        <description>.NET 3.5</description>
        <language>en-US</language>
        <copyright>Stuart Thompson</copyright>
        <managingEditor>stuart.thompson@sftsrc.com</managingEditor>
        <generator>Subtext Version 1.9.5.0</generator>
        <item>
            <title>New Array of Anonymous Objects</title>
            <link>http://blogs.sftsrc.com/stuart/archive/2008/07/09/96.aspx</link>
            <description>&lt;p&gt;While coding up a couple of prototype LINQ queries this morning I came across a rather interesting syntax using anonymous types and object initializers.  I wanted to show an example of using a where clause upon a property of an object but didn’t want to put a bunch of plumbing around it just to set up the example.  In my head an array containing three &lt;em&gt;Person&lt;/em&gt; objects would suffice, with each person object having &lt;em&gt;Name &lt;/em&gt;and &lt;em&gt;Age&lt;/em&gt; properties that I could use in my query.  I wasn’t sure if this would compile but dropped it into the wonderful &lt;a href="http://www.linqpad.net/"&gt;LinqPad&lt;/a&gt; and sure enough found that it compiled right away, giving me exactly the results I was looking for.&lt;/p&gt;
&lt;p style="BORDER-RIGHT: #444444 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #444444 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; BORDER-LEFT: #444444 1px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #444444 1px solid; BACKGROUND-COLOR: #ffffdd"&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt; person &lt;font color="#0000ff"&gt;in new&lt;/font&gt; [] {&lt;br /&gt;    &lt;font color="#0000ff"&gt;new&lt;/font&gt; { Name=&lt;font color="#993300"&gt;"Bob"&lt;/font&gt;, Age=&lt;font color="#993300"&gt;28&lt;/font&gt; }, &lt;br /&gt;    &lt;font color="#0000ff"&gt;new&lt;/font&gt; { Name=&lt;font color="#993300"&gt;"Ted"&lt;/font&gt;, Age=&lt;font color="#993300"&gt;22&lt;/font&gt; } &lt;br /&gt;    &lt;font color="#0000ff"&gt;new&lt;/font&gt; { Name=&lt;font color="#993300"&gt;"Sally"&lt;/font&gt;, Age=&lt;font color="#993300"&gt;25&lt;/font&gt; } }&lt;br /&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt; person.Age &amp;lt; &lt;font color="#993300"&gt;26&lt;/font&gt; &lt;br /&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt; person &lt;/p&gt;I can declare a &lt;font color="#0000ff"&gt;new&lt;/font&gt; [] { &lt;em&gt;&lt;font color="#808080"&gt;&amp;lt;set of anonymous types&amp;gt;&lt;/font&gt;&lt;/em&gt; } right there in the query, saving me the job of creating all of the plumbing around it just for the sake of the sample.  Cool!&lt;img src="http://blogs.sftsrc.com/stuart/aggbug/96.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stuart Thompson</dc:creator>
            <guid>http://blogs.sftsrc.com/stuart/archive/2008/07/09/96.aspx</guid>
            <pubDate>Wed, 09 Jul 2008 18:08:57 GMT</pubDate>
            <comments>http://blogs.sftsrc.com/stuart/archive/2008/07/09/96.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.sftsrc.com/stuart/comments/commentRss/96.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Expressions, Delegates, and Lambdas, Oh My!</title>
            <link>http://blogs.sftsrc.com/stuart/archive/2008/07/07/94.aspx</link>
            <description>&lt;p&gt; C# 3.0 heralded a new era of syntax candy that was introduced in a large part to support LINQ.  The new syntax also brings expanded freedom of expression for developers, however by increasing the number of ways in which similar intentions may be expressed there is additional opportunity for confusion.  In order to alleviate some of this confusion I decided to write about some of these new approaches and provide a reference for understanding how they relate to one another. &lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Anonymous Methods&lt;/strong&gt;&lt;br /&gt;
First up on the chopping block are anonymous methods.  Let's look at why these are cool and where you might expect to encounter them in code.  Prior to .NET 2.0, the only way to declare a delegate was using named methods.  If you aren't familiar with the concept of delegates, I highly recommend you read &lt;a href="http://msdn.microsoft.com/en-us/library/ms173171(VS.80).aspx"&gt;this MSDN article&lt;/a&gt; before proceeding.  It will bring you up to speed on new world function pointers and make the rest of the article much more useful.  Assuming familiarity with old-school delegates, consider the following example of a named delegate and then an equivalent anonymous method and how the two are related. &lt;/p&gt;
&lt;p&gt; This example shows a standard delegate definition, a method whose signature matches that delegate, and then a class that uses a delegate of that shape.  Then we'll look at how an anonymous delegate could be used to achieve the same thing.&lt;br /&gt;
&lt;br /&gt;
First we declare the delegate shape:&lt;br /&gt;
&lt;/p&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt; &lt;span style="font-family: Courier New;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public delegate string&lt;/span&gt; UsefulDelegate(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;inputA, DateTime inputB);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we declare a method that adheres to that shape:&lt;br /&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt; &lt;span style="font-family: Courier New;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public string&lt;/span&gt; DoSomethingUseful(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;num, DateTime dateTime)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;String.Format("[Worker 1] Value {0} processed at {1}", num, dateTime);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally there is the consumer of this delegate:&lt;br /&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt; &lt;span style="font-family: Courier New;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; ManageSomething(UsefulDelegate worker, &lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;num)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;someValue = 5;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     worker.Invoke(someValue, DateTime.Now);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a pretty boring example but it will suffice to get the point across.  Now imagine that you are handed a dll that contains the &lt;em&gt;ManageSomething&lt;/em&gt; method.  You're required to use this method as it represents a common point in the application you're integrating with.  Rather than defining a delegate shape and implementation method, wouldn't it be nice to just pass in the contents of the delegate?  That's precisely what an anonymous method allows you to do.  Consider the following implementation:&lt;br /&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt; &lt;span style="font-family: Courier New;"&gt;ManageSomething(&lt;span style="color: rgb(0, 0, 255);"&gt;delegate&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;A, DateTime B) { &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;String.Format("{0}: {1}", A, B); });&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That's pretty slick!  In this rather contrived case we have abstracted a lot of the considerations that would lead you to choose an anonymous delegate over an explicitly defined version.  One good case for using an anonymous delegate is if your application will only implement one method of that &lt;em&gt;shape&lt;/em&gt;.  Why formally define a delegate to constrain the signature of only one implemented method?  Let's consider the reason delegates exist in the first place.  They constrain the signature of a method such that another class can invoke that method safe in the knowledge that the parameter and return types for that method will conform to its needs.  However, if we are only going to ever declare a single implementation then it's really nice to place that implementation inline and avoid the wastage of a delegate definition.&lt;br /&gt;
&lt;br /&gt;
Still, that whole &lt;em&gt;delegate() { }&lt;/em&gt; stuff wrapping the actual code performing the work seems a little bit long-winded don't you think?  This &lt;strong&gt;is&lt;/strong&gt; new C# 3.0 Hyper Jet-Filtered Edition after all!
&lt;p&gt; &lt;strong&gt;Lambda Expressions&lt;/strong&gt;&lt;br /&gt;
Enter the lambda expression.  A lambda expression is an anonymous function that can be used to create a delegate or expression tree.  Hmm, that sounds impressive, but what does it mean?  What it means is that you can remove the &lt;em&gt;new delegate() { }&lt;/em&gt; stuff and replace it with the operator =&amp;gt;.  This new operator is read as "goes to" and roughly means "the parameters on the left side of =&amp;gt; are fed as parameters to the function on the right."  Let's look at this in the context of our ManageSomething() method call.  Using a lambda expression this could be re-written as:&lt;br /&gt;
&lt;/p&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt; &lt;span style="font-family: Courier New;"&gt;ManageSomething((&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;A, DateTime B) =&amp;gt; &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;String.Format("[Worker 3] Value {0} processed at {1}", B, A)); &lt;/span&gt;&lt;/div&gt;
&lt;p&gt; The left-hand side of the expression specifies the parameters that will be supplied and the right-hand side of the expression contains the function body.  Hurrah!  The need for the delegate, return and { } have disappeared!  That is not all that lambda expressions bring as they can also be used to build expression trees, but that discussion is best left for another post.  Suffice to say for now that these are three different forms for expressing the same intent.  The compiler will sort out the rest. &lt;/p&gt;
&lt;p&gt; The purpose of this post is not to dive into the finer points of named methods, delegates, anonymous methods, or lambdas, rather to give a first look at the three forms to pave the way for a more in-depth investigation. &lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Example Listing&lt;/strong&gt;&lt;br /&gt;
For those of you who use snippet compiler, here is a sample listing that can be directly pasted in and tweaked:&lt;/p&gt;
&lt;div style="border: 1px solid rgb(68, 68, 68); padding: 3px; background-color: rgb(255, 255, 221);"&gt;&lt;span style="color: rgb(0, 0, 255); font-family: Courier New;"&gt;using &lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;System;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="color: rgb(0, 0, 255); font-family: Courier New;"&gt;using &lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;System.Collections.Generic;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt; MyClass&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public static void&lt;/span&gt; RunSnippet()&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         Manager m = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;Manager();&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(51, 153, 102);"&gt;// First example  (defined delegate)&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         m.ManageSomething(DoSomethingUseful);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(51, 153, 102);"&gt;// Second example (anonymous method)&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         m.ManageSomething(&lt;span style="color: rgb(0, 0, 255);"&gt;delegate&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;A, DateTime B) { &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;String.Format(&lt;span style="color: rgb(128, 0, 0);"&gt;"[Worker 2] Value {0} processed at {1}"&lt;/span&gt;, A, B); });&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(51, 153, 102);"&gt;// Third example (lambda expression)&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         m.ManageSomething((&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;A, DateTime B) =&amp;gt; String.Format(&lt;span style="color: rgb(128, 0, 0);"&gt;"[Worker 3] Value {0} processed at {1}"&lt;/span&gt;, A, B));&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public static string&lt;/span&gt; DoSomethingUseful(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;num, DateTime dateTime)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; String.Format(&lt;span style="color: rgb(128, 0, 0);"&gt;"[Worker 1] Value {0} processed at {1}"&lt;/span&gt;, num, dateTime);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;private class&lt;/span&gt; Manager&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public delegate string&lt;/span&gt; UsefulDelegate(&lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;inputA, DateTime inputB);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;public void &lt;/span&gt;ManageSomething(UsefulDelegate worker)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;int &lt;/span&gt;someValue = 5;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             Console.WriteLine(worker.DynamicInvoke(someValue, DateTime.Now));&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(128, 128, 128);"&gt;#region Helper methods&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public static void&lt;/span&gt; Main()&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             RunSnippet();&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;catch &lt;/span&gt;(Exception e)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;string &lt;/span&gt;error = &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.Format(&lt;span style="color: rgb(128, 0, 0);"&gt;"---\nThe following error occurred while executing the snippet:\n{0}\n---"&lt;/span&gt;, e.ToString());&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             Console.WriteLine(error);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;finally&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             Console.Write(&lt;span style="color: rgb(128, 0, 0);"&gt;"Press any key to continue..."&lt;/span&gt;);&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;             Console.ReadKey();&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt; private static void&lt;/span&gt; WL(&lt;span style="color: rgb(0, 0, 255);"&gt;object &lt;/span&gt;text, &lt;span style="color: rgb(0, 0, 255);"&gt;params object&lt;/span&gt;[] args)&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         Console.WriteLine(text.ToString(), args);    &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;private static void&lt;/span&gt; RL()&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         Console.ReadLine();    &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;private static void&lt;/span&gt; Break() &lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     {&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;         System.Diagnostics.Debugger.Break();&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     }&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt;     &lt;span style="color: rgb(128, 128, 128);"&gt;#endregion&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Courier New;" /&gt;
&lt;span style="font-family: Courier New;"&gt; }&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://blogs.sftsrc.com/stuart/aggbug/94.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stuart Thompson</dc:creator>
            <guid>http://blogs.sftsrc.com/stuart/archive/2008/07/07/94.aspx</guid>
            <pubDate>Mon, 07 Jul 2008 18:54:29 GMT</pubDate>
            <comments>http://blogs.sftsrc.com/stuart/archive/2008/07/07/94.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.sftsrc.com/stuart/comments/commentRss/94.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>