<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Leaning Into Windows - All Comments</title><link>http://msmvps.com/blogs/kathleen/default.aspx</link><description>Kathleen Dollard&amp;#39;s view of life and .NET development</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>EventSource: A New Way to Trace</title><link>http://msmvps.com/blogs/kathleen/archive/2013/04/03/module-2-high-points-portable-class-libraries.aspx#1829319</link><pubDate>Fri, 03 May 2013 22:23:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1829319</guid><dc:creator>Leaning Into Windows</dc:creator><description>&lt;p&gt;Module 3 Highlights This is the next installment in my series of high points in .NET 4.5, which parallels&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1829319" width="1" height="1"&gt;</description></item><item><title>EventSource: A New Way to Trace</title><link>http://msmvps.com/blogs/kathleen/archive/2013/03/29/module-1-high-points-side-by-side-implications.aspx#1829318</link><pubDate>Fri, 03 May 2013 22:21:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1829318</guid><dc:creator>Leaning Into Windows</dc:creator><description>&lt;p&gt;Module 3 Highlights This is the next installment in my series of high points in .NET 4.5, which parallels&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1829318" width="1" height="1"&gt;</description></item><item><title>re: Plain Old Objects and MEF</title><link>http://msmvps.com/blogs/kathleen/archive/2012/10/11/plain-old-objects-and-mef.aspx#1817965</link><pubDate>Thu, 11 Oct 2012 20:58:46 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1817965</guid><dc:creator>Damon Payne</dc:creator><description>&lt;p&gt;I agree with what you&amp;#39;ve said here in terms of complexity, but it seems that what&amp;#39;s not mentioned here is the performance cost. Because of MEF&amp;#39;s atomic composition internals (I&amp;#39;m guessing a bit here but have gone through the source) the cost of creating an object from a composition container is less trivial than some traditional containers. We&amp;#39;ve found that, in places where we need to create 10s of thousands of parts in a loop, MEF starts to eat CPU like crazy. In some cases this was the difference between near-instant response and minutes-long waiting. A fully composed system might wind up with tremendous overhead. &amp;nbsp;I know MEF2 has the lightweight composition option, it would be interesting to create a comparison.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1817965" width="1" height="1"&gt;</description></item><item><title>re: Breaking into the Visual Studio .SOU File</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/21/breaking-into-the-visual-studio-sou-file.aspx#1815473</link><pubDate>Fri, 24 Aug 2012 17:35:01 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815473</guid><dc:creator>Erik Dietrich</dc:creator><description>&lt;p&gt;I second the motion for readable formats for these. &amp;nbsp;I often find myself wanting to see/confirm which settings are for users and which settings will alter source controlled files like the csproj file. &amp;nbsp;I&amp;#39;d kind of given up on being able to do anything with these -- thanks!&lt;/p&gt;
&lt;p&gt;(By the way, your captcha isn&amp;#39;t loading in chrome for me)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815473" width="1" height="1"&gt;</description></item><item><title>re: To “as” or not to “as”</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/12/to-as-or-not-to-as.aspx#1815108</link><pubDate>Tue, 14 Aug 2012 21:48:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815108</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I guess I was seeing it in two ways. First it would help people understand or remember that&amp;#39;s it can be null. Far too many times I&amp;#39;ve seen somebody use &amp;quot;as&amp;quot; and then immediately without any checks perform operations on it that could result in a null reference.&lt;/p&gt;
&lt;p&gt;The other case is just consistency. I guess in my ideal world, the language spec would state that an as MUST be followed by a ??.&lt;/p&gt;
&lt;p&gt;With that said, the few times I use an as without specifying a default, I don&amp;#39;t say &amp;quot;?? null&amp;quot; but I&amp;#39;d be willing to accept that for the extra safety. But even without compiler enforcing it, it could be a good idea.&lt;/p&gt;
&lt;p&gt;On another note, why do people love &amp;quot;if (something != null)&amp;quot;? To me &amp;quot;if (something is string)&amp;quot; reads much better. Admittedly we REALLY need an &amp;quot;is not&amp;quot; because &amp;quot;if (!(something is string))&amp;quot; is awful&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815108" width="1" height="1"&gt;</description></item><item><title>re: To “as” or not to “as”</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/12/to-as-or-not-to-as.aspx#1815098</link><pubDate>Tue, 14 Aug 2012 14:17:44 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815098</guid><dc:creator>Kathleen</dc:creator><description>&lt;p&gt;Tim,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s a really good point. I think of adjacent code in terms of debugging, but refactoring is affected even more. Especially since side cases are sometimes overlooked in unit testing, and unit testing is the safety net for refactoring. &lt;/p&gt;
&lt;p&gt;But, by &amp;quot;immediate and adjacent&amp;quot;, I mean code that looks something like:&lt;/p&gt;
&lt;p&gt;var list = myList As List&amp;lt;String&amp;gt;&lt;/p&gt;
&lt;p&gt;if (list == null)&lt;/p&gt;
&lt;p&gt;{ throw new InvalidCastException(&amp;quot;special notes&amp;quot;); }&lt;/p&gt;
&lt;p&gt;If someone misses that on refactoring, are the paying dangerously insufficient attention to the code?&lt;/p&gt;
&lt;p&gt;Kathleen &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815098" width="1" height="1"&gt;</description></item><item><title>re: To “as” or not to “as”</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/12/to-as-or-not-to-as.aspx#1815097</link><pubDate>Tue, 14 Aug 2012 14:12:40 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815097</guid><dc:creator>Kathleen</dc:creator><description>&lt;p&gt;Chris,&lt;/p&gt;
&lt;p&gt;Is you&amp;#39;re suggestion to use &lt;/p&gt;
&lt;p&gt;var str = myObject as string ?? null;&lt;/p&gt;
&lt;p&gt;because not enough people grok the implication of &amp;quot;as&amp;quot;, or because the &amp;quot;as&amp;quot; keyword is to subtle for something more important. &lt;/p&gt;
&lt;p&gt;It&amp;#39;s an interesting suggestion, and I&amp;#39;m wondering if it&amp;#39;s for code in teams where people might not understand the effect, or for code in teams that understand this point, but might just read right past the implication in a particular piece of code.&lt;/p&gt;
&lt;p&gt;Kathleen &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815097" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1815096</link><pubDate>Tue, 14 Aug 2012 13:02:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815096</guid><dc:creator>Tim Barrass</dc:creator><description>&lt;p&gt;Great -- now I&amp;#39;m stuck here trying to think up a legitimate use case for the VS2010 behaviour. Nice spot, thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815096" width="1" height="1"&gt;</description></item><item><title>re: To “as” or not to “as”</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/12/to-as-or-not-to-as.aspx#1815095</link><pubDate>Tue, 14 Aug 2012 12:55:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815095</guid><dc:creator>Tim Barrass</dc:creator><description>&lt;p&gt;Quite right! and a good comment from Chris. I think I&amp;#39;d be stricter on &lt;/p&gt;
&lt;p&gt;&amp;quot;or you have an immediate and adjacent test that you prefer to make the application state correct or perform different exception management&amp;quot;&lt;/p&gt;
&lt;p&gt;however, as code is always at risk of relocation during refactoring -- and I wouldn&amp;#39;t want to complicate refactoring by having to think about the implied need for a local check.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815095" width="1" height="1"&gt;</description></item><item><title>re: To “as” or not to “as”</title><link>http://msmvps.com/blogs/kathleen/archive/2012/08/12/to-as-or-not-to-as.aspx#1815079</link><pubDate>Tue, 14 Aug 2012 01:06:53 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815079</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Completely agree, It always surprises me how many people defend &amp;quot;as&amp;quot; and how weak their reasoning usually is.&lt;/p&gt;
&lt;p&gt;Personally I like the idea of for each as have a ?? It&amp;#39;s a nice way of making sure you&amp;#39;ve thought about the case and provide a good default instead of just null.&lt;/p&gt;
&lt;p&gt;var str = myObject as string ?? string.Empty;&lt;/p&gt;
&lt;p&gt;You could even argue that something like&lt;/p&gt;
&lt;p&gt;var str = myObject as string ?? null;&lt;/p&gt;
&lt;p&gt;is a good idea as it forces you to explicitly accept the null and brings attention to the fact it can be null.&lt;/p&gt;
&lt;p&gt;And further if this was really embraced by .NET it could be used with stucts...&lt;/p&gt;
&lt;p&gt;var foo = bar as int ?? 0;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1815079" width="1" height="1"&gt;</description></item><item><title>re: INotifyPropertyChanged Implementation for VS2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/06/30/inotifypropertychanged-implementation-for-vs2012.aspx#1812289</link><pubDate>Wed, 04 Jul 2012 15:10:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812289</guid><dc:creator>Kathleen</dc:creator><description>&lt;p&gt;Sebastian,&lt;/p&gt;
&lt;p&gt;Since OnPropertyChanged is a protected method, it could be called from a version of a property that does NOT implement SetProperty. In that case the CallerMemberName would still work. &lt;/p&gt;
&lt;p&gt;This also shows the ability to &amp;quot;chain&amp;quot; the member name. While any cirect call to OnPropertyChanged can skip the optinal paramemter, the SetProperty method just passes on the value. &lt;/p&gt;
&lt;p&gt;Microsoft is muddying the waters a little on the language/Visual Studio distinction - using Visual Studio 2012 to refer to this release that bundles .NET 4.5, C# 5, VB 11, and a boatload of library updates. While you&amp;#39;re absolutely correct that this is a language feature, I&amp;#39;m using VS 2012 to refer to the bundled set. &lt;/p&gt;
&lt;p&gt;Kathleen &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812289" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1812287</link><pubDate>Wed, 04 Jul 2012 15:04:58 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812287</guid><dc:creator>Kathleen</dc:creator><description>&lt;p&gt;Thank you to the folks that pointed out my dumb mistake when I whipped up the code (which I do and delete when I&amp;#39;m speaking on this) for this post. &lt;/p&gt;
&lt;p&gt;Kathleen&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812287" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1812283</link><pubDate>Wed, 04 Jul 2012 14:20:44 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812283</guid><dc:creator>Phil Bolduc</dc:creator><description>&lt;p&gt;In section &amp;#39;The Visual Studio 2012 Change&amp;#39;, you forgot to assign the value of i to x. &amp;nbsp;Without the assignment, the code will not compile. &amp;nbsp;The code should read:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Changes are here&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var x = i; &amp;nbsp;// fix is here&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actions.Add(() =&amp;gt; Console.WriteLine(x));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// End changes&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812283" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1812268</link><pubDate>Wed, 04 Jul 2012 08:44:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812268</guid><dc:creator>Damien</dc:creator><description>&lt;p&gt;Third code sample (prefaced by &amp;quot;Logically it&amp;#39;s the same as:&amp;quot;) is slightly wrong.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var x;&lt;/p&gt;
&lt;p&gt;Should read:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var x = i;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812268" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1812242</link><pubDate>Tue, 03 Jul 2012 21:34:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812242</guid><dc:creator>Keith Hill</dc:creator><description>&lt;p&gt;Good catch. &amp;nbsp;Thanks for sharing!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812242" width="1" height="1"&gt;</description></item><item><title>re: Lifting ForEach, Breaking Change in Visual Studio 2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/07/03/lifting-foreach-breaking-change-in-visual-studio-2012.aspx#1812222</link><pubDate>Tue, 03 Jul 2012 15:26:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812222</guid><dc:creator>Ken</dc:creator><description>&lt;p&gt;You forgot to initialize var x = i; just below the Changes are here comment&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812222" width="1" height="1"&gt;</description></item><item><title>re: INotifyPropertyChanged Implementation for VS2012</title><link>http://msmvps.com/blogs/kathleen/archive/2012/06/30/inotifypropertychanged-implementation-for-vs2012.aspx#1812186</link><pubDate>Tue, 03 Jul 2012 05:46:35 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1812186</guid><dc:creator>sebastian</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;this is great.&lt;/p&gt;
&lt;p&gt;but: is it right to have the CallerMemberName-Attribute in the OnPropertyChanged method?&lt;/p&gt;
&lt;p&gt;and one more thing: i always wonder why some language extension of c# and/or vb is marketed as an improvement visual studio brings. cant we use the version the languages brings by them self?&lt;/p&gt;
&lt;p&gt;thanks for the post.&lt;/p&gt;
&lt;p&gt;sebastian&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1812186" width="1" height="1"&gt;</description></item><item><title>TaskCancelledException vs OperationCancelledException</title><link>http://msmvps.com/blogs/kathleen/archive/2012/05/25/taskcancelledexception-vs-operationcancelledexception.aspx#1810508</link><pubDate>Fri, 01 Jun 2012 14:24:18 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1810508</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You&amp;#39;ve been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1810508" width="1" height="1"&gt;</description></item><item><title>re: Roslyn</title><link>http://msmvps.com/blogs/kathleen/archive/2012/04/18/roslyn.aspx#1809990</link><pubDate>Sat, 19 May 2012 16:50:27 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1809990</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;Miklos, I remember using MGrammar, it was great!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1809990" width="1" height="1"&gt;</description></item><item><title>re: In Praise of Nested Classes</title><link>http://msmvps.com/blogs/kathleen/archive/2008/09/05/in-praise-of-nested-classes.aspx#1809617</link><pubDate>Tue, 08 May 2012 08:37:17 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1809617</guid><dc:creator>Manish</dc:creator><description>&lt;p&gt;At first look, it looks brilliant , I thought I could have saved a lot of classes. But then I realize that why we have to build a nested class for the list if we do have already generic classes in .net like List&amp;lt;T&amp;gt; . &lt;/p&gt;
&lt;p&gt;As per my concern If i have to write any custom collection class then I am also interesting to write some custom functionality for each class , but I didn&amp;#39;t see any custom activity which I can do for each class which already made by the Nested List Class. Can you elaborate me the concept behind generating this list class.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1809617" width="1" height="1"&gt;</description></item></channel></rss>