<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/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>You Can Take it With You</title><link>http://www.pluralsight.com/community/blogs/jimw/default.aspx</link><description>Mobile device and smart client development thru the eyes of Jim</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>24 Hours of Windows Mobile Webcast Series Continues – Creating Adaptive Applications</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/09/23/24-hours-of-windows-mobile-webcast-series-continues-creating-adaptive-applications.aspx</link><pubDate>Tue, 23 Sep 2008 20:58:37 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:53627</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=53627</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/09/23/24-hours-of-windows-mobile-webcast-series-continues-creating-adaptive-applications.aspx#comments</comments><description>&lt;p&gt;It has been quite a while since I posted as the summer has just been crazy busy. With the start of a new season (today&amp;#39;s the first full day of autumn), I&amp;#39;m now getting back to my more regular blogging schedule.
&lt;/p&gt;&lt;p&gt;What better time is there to get back into blogging than when one has the opportunity for shameless self-promotion? &lt;span style="font-family:Wingdings;"&gt;J&lt;/span&gt; Tomorrow (Wednesday 24-September-2008), I&amp;#39;m presenting a webcast &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032389189"&gt;on Creating Adaptive Windows Mobile Applications&lt;/a&gt;. 
&lt;/p&gt;&lt;p&gt;As some of you may know, I&amp;#39;ve done webcasts and written papers on the topic of application adaptability in the past. The thing I find so interesting about the issue of application adaptability is how much solutions and techniques evolve. It&amp;#39;s been nearly 3 years since I last did a Webcast on application adaptability and during that time a lot of new devices have been released making it a good time to revisit the topic.
&lt;/p&gt;&lt;p&gt;Let me start by saying that this is &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; a talk about &amp;quot;Write Once Run Everywhere&amp;quot; … It is a talk about writing a single adaptable application that runs successfully across the entire family of Windows Mobile devices. &amp;quot;Write Once Run Anywhere&amp;quot; is really just marketing hype that many people in the mobile device space get excited about (I was once guilty of promoting the term myself). 
&lt;/p&gt;&lt;p&gt;Device adaptability is designing an application so that the application&amp;#39;s core functionality is decoupled from the application&amp;#39;s interaction with the device features. Adapting to differences in each device&amp;#39;s user interface is part of the story but it&amp;#39;s not the whole story. There&amp;#39;s also the issue of adapting to differences in network capabilities, phone features, GPS access, and any other features that may vary between devices. 
&lt;/p&gt;&lt;p&gt;As mobile devices become increasingly rich, the differences between device features will become increasingly significant. Please &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032389189"&gt;join me on Wednesday (24-September-2008)&lt;/a&gt; as I talk about techniques for assuring that your application takes advantage of individual device capabilities while assuring that all users, even those with less capable devices, have the best possible application experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=53627" width="1" height="1"&gt;</description></item><item><title>Debugging device cellular connection code without ActiveSync interference</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/07/16/debugging-device-cellular-connection-code-without-activesync-interference.aspx</link><pubDate>Wed, 16 Jul 2008 13:43:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:51872</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=51872</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/07/16/debugging-device-cellular-connection-code-without-activesync-interference.aspx#comments</comments><description>&lt;p&gt;I had a situation today where I needed to debug some code that used Connection Manager to establish a cellular connection. The challenge was that the connectivity problem was only observed on certain devices therefore I couldn&amp;#39;t use the Device Emulator &amp;amp; Cellular Emulator to debug &amp;hellip; I needed to debug on a real device. &lt;/p&gt;
&lt;p&gt;This all sounds simple enough until you start to try and do it&amp;hellip; In order to debug application code using Visual Studio, I have to connect the device to my desktop using ActiveSync or WMDC. &lt;/p&gt;
&lt;p&gt;Now here&amp;#39;s the problem&amp;hellip; &lt;/p&gt;
&lt;p&gt;I want my application to establish a cellular connection but ActiveSync/WMDC provide the device with network connectivity &amp;hellip; as a result any call to ConnMgrEstablishConnection or ConnMgrEstablishConnectionSync to establish the network connection returns with a successful connection but not a cellular connection because Connection Manager is recognizing that the current ActiveSync/WMDC connection meets the application&amp;#39;s network connectivity requirements. &lt;/p&gt;
&lt;p&gt;I could modify my code to explicitly establish a cellular connection but I want to debug the application code as it will run in real life. In real life, I want Connection Manager to choose the appropriate connection &amp;hellip; I just need to debug the cellular scenario right now. &lt;/p&gt;
&lt;p&gt;I have to say that I did stare at my screen for a minute or so wondering what kind of kludge I could come up with to get the device to not use ActiveSync/WMDC and then I realized &amp;hellip; the answer is quite simple. &lt;/p&gt;
&lt;p&gt;Windows Mobile manages connections as connecting to Work Network or connecting to The Internet. Since I&amp;#39;m trying to create a cellular connection, I want an Internet connection. All I need to do is tell the device that ActiveSync/WMDC doesn&amp;#39;t provide Internet connections. &lt;/p&gt;
&lt;p&gt;On the ActiveSync Connection Settings dialog there&amp;#39;s a selection that reads &amp;quot;This computer is connected to:&amp;quot; with a default value of Automatic. Simply changing that setting from Automatic to Work Network solves all my problems. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://jwhh.com/images/ASConnectedTo.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now when I call connection manager requesting a connection that reaches a location on the Internet, Connection Manager looks at the ActiveSync/WMDC setting and determines that ActiveSync/WMDC connection cannot meet that requirement; therefore, Connection Manager looks for other choices which then initiates a new Cellular Connection just as it would in the field when not connected to ActiveSync. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Viola&lt;/em&gt; &amp;hellip; I can debug my cellular connectivity code &lt;span style="font-family:Wingdings;"&gt;J&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;Like many of us, I&amp;#39;ve often found the whole Windows Mobile Work Network vs. The Internet connectivity handling to be a bit of a pain but in this case it did make my life easier. Of course what would be even better is to have a way to explicitly do what I really wanted to do&amp;hellip; setup an application debugging scenario that let&amp;#39;s one choose whether ActiveSync should be considered a viable connection route during application debugging. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=51872" width="1" height="1"&gt;</description></item><item><title>Windows Mobile Webcast Series – Getting Ready for Tech Ed (and other life changing events)</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/05/20/51005.aspx</link><pubDate>Tue, 20 May 2008 17:55:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:51005</guid><dc:creator>jim-wilson</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=51005</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/05/20/51005.aspx#comments</comments><description>&lt;P&gt;If you've been thinking about getting started with Windows Mobile programming, then you'll want to check out this webcast series co-presented by Maarten Struys, Constanze Roman, and me. &lt;/P&gt;
&lt;P&gt;We originally put this series together so that people who are new to Windows Mobile could get a foundation in Windows Mobile before attending TechEd Windows Mobile-related sessions. Honestly though, this series is useful for anyone who is looking to start developing Windows Mobile applications whether or not you're attending TechEd. &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Part 1: &lt;A href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032379366&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;Developing Applications for Windows Mobile Devices&lt;/A&gt; (available on-demand) 
&lt;LI&gt;Part 2: &lt;A href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032379607&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;Developing Your First Real Windows Mobile 6 Application&lt;/A&gt; (available on-demand) 
&lt;LI&gt;Part 3: &lt;A href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032379614&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;Using Device Capabilities and Device Functionality&lt;/A&gt; (available on-demand) 
&lt;LI&gt;Part 4: &lt;A href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032379716&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;Mobile Data Strategies and Synchronization Using SQL Server Compact, XML, and LINQ&lt;/A&gt; (available on-demand) 
&lt;LI&gt;Part 5: &lt;A href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032380303&amp;amp;CountryCode=US"&gt;Windows Mobile Development - Live from TechEd Orlando &lt;/A&gt;(available on-demand) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Sooner or later, almost every developer will be involved in developing mobile applications; this series is a great way to quickly build up a foundation in Windows Mobile development and learn how you can apply your existing .NET skills to create rich mobile applications. &lt;/P&gt;
&lt;P&gt;If you miss one of the live broadcasts, remember that all webcasts become available for on-demand viewing starting approximately 24 hours after the live broadcast. Whether you're viewing the webcast live or on-demand, the above links will take you there.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=51005" width="1" height="1"&gt;</description></item><item><title>WCF Strategies for Windows Mobile Webcast</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/05/11/50892.aspx</link><pubDate>Sun, 11 May 2008 13:27:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50892</guid><dc:creator>jim-wilson</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50892</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/05/11/50892.aspx#comments</comments><description>&lt;p&gt;Due to a last minute scheduling problem, my planned appearance on &lt;a href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/a&gt; last week to talk about Windows Communications Foundation (WCF) Strategies for Windows Mobile had to be rescheduled. 
&lt;/p&gt;&lt;p&gt;I realize it's a bit of short notice but I wanted to let everyone know that it is now scheduled for Monday 12-May at 12-noon PDT (3PM EDT, 19:00 UTC). The &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032376632&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;URL to register for the webcast&lt;/a&gt; is still the same.
&lt;/p&gt;&lt;p&gt;I really encourage you to come by and checkout this webcast. Although, our initial point of reference is WCF on Windows Mobile, most of what we talk about applies equally to all mobile-oriented applications whether running on a Windows Mobile device, or laptop/notebook computer. 
&lt;/p&gt;&lt;p&gt;One of the key areas we'll address is the Store and Forward transport and its usefulness in applications that may be intermittently online or that may switch between wired, wireless, or cellular networks.
&lt;/p&gt;&lt;p&gt;Remember that &lt;a href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/a&gt; webcasts are more interactive than most, allowing an opportunity for you to ask questions and for us to share a very interactive dialog. As always though, I'll be showing some demos so that you can see some real code at work.
&lt;/p&gt;&lt;p&gt;I hope to see you there. If you're not yet doing mobile application development, you almost definitely will be doing so very soon and this is a great way to learn about some of the common considerations and solutions for communicating in this loosely-connected environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50892" width="1" height="1"&gt;</description></item><item><title>A Whirlwind of Webcasts</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/28/50803.aspx</link><pubDate>Mon, 28 Apr 2008 22:23:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50803</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50803</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/28/50803.aspx#comments</comments><description>&lt;P&gt;It looks like Webcast season is upon us &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; &amp;#8230; &lt;/P&gt;
&lt;P&gt;Between now and Tech Ed, &lt;A href="http://www.dotnetfordevices.com/forum.html"&gt;Maarten Struys&lt;/A&gt; and I will be presenting a combined total of 7 webcasts. &lt;/P&gt;
&lt;P&gt;This Wednesday, 30-April and next Wednesday, 7-May I'll be the guest on MSDN's &lt;A href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Then starting next week (week of 5-May), Maarten Struys and I will be co-presenting a multi-part webcast series on a variety of Windows Mobile topics as a lead-in to &lt;A href="http://www.microsoft.com/events/teched2008/developer/default.mspx"&gt;Tech Ed Developer 2008&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;geekSpeak &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This Wednesday (30-April) I'll be talking about &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032374739&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;&lt;EM&gt;SQL Server Compact Tips and Tricks&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; &lt;/EM&gt;(both devices and desktop). &lt;/P&gt;
&lt;P&gt;I'm really looking forward to this talk. Those of you who have followed my blog or who have seen my whitepapers or webcasts know that I'm a big fan of SQL Server Compact. Although it provides excellent code &amp;amp; SQL compatibility with SQL Server, the details of the underlying architecture sometimes require a different approach. That's what we'll be talking about &amp;#8230; how to get the most out of SQL Server Compact. &lt;/P&gt;
&lt;P&gt;Next Wednesday (7-May), I'll be talking about &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032376632&amp;amp;EventCategory=4&amp;amp;culture=en-US&amp;amp;CountryCode=US"&gt;&lt;EM&gt;Windows Communication Foundation (WCF) Strategies for Windows Mobile&lt;/EM&gt;&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Although not the focus of the entire webcast, we'll definitely be talking a bunch about using Store-and-Forward messaging. Whether you're targeting Windows Mobile devices or focus more on desktop applications, you'll want to be there. &lt;/P&gt;
&lt;P&gt;Most of the same strategies we use for Windows Mobile applications apply equally to applications running on a laptop/notebook computer with Store-and-Forward messaging being a great example. Any application (Windows Mobile or Laptop-based) that needs to be away from connectivity periodically faces communications challenges that Store-and-Forward messaging addresses as it allows your app to simply send messages and the Store-and-Forward mechanism caches the messages automatically sending them whenever connectivity becomes available. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="TEXT-DECORATION: underline"&gt;&lt;STRONG&gt;Bring your questions&lt;/STRONG&gt;&lt;/SPAN&gt;: If you haven't been to a &lt;A href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/A&gt; webcast before, you don't know what you're missing. &lt;/P&gt;
&lt;P&gt;These are much more two-way than traditional webcasts. Don't get me wrong, I love traditional webcasts where I get to show you a bunch of code but &lt;A href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/A&gt; provides a great adjunct. On &lt;A href="http://blogs.msdn.com/geekspeak/default.aspx"&gt;geekSpeak&lt;/A&gt; we engage much more in a conversation; the discussions are very listener driven with much of the time focused on addressing those things that you ask about. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;Countdown to Tech Ed Developer 2008 &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We don't have all of the details posted yet but staring next week (week of 5-May), Maarten and I will be doing webcasts each week covering a different aspect of Windows Mobile development. &lt;/P&gt;
&lt;P&gt;The webcasts are aimed at people who are new to Windows Mobile or who may be looking to gain a deeper understanding of the tools and capabilities of Windows Mobile application development. Keep a watch here on my blog and I'll provide further details on these webcasts as we get them published. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50803" width="1" height="1"&gt;</description></item><item><title>Using LINQ to Access SQL Server Compact Directly – A follow up</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/18/50753.aspx</link><pubDate>Fri, 18 Apr 2008 18:37:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50753</guid><dc:creator>jim-wilson</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50753</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/18/50753.aspx#comments</comments><description>&lt;p&gt;You may recall my &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/a&gt; from about 6/7 weeks ago where &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx"&gt;I talked about&lt;/a&gt; how to use custom extension methods to allow your mobile device applications to efficiently query a SQL Server Compact (SSC) databases directly.
&lt;/p&gt;&lt;p&gt;I received a question today regarding the &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/a&gt;. The question relates to the verbosity of returning anonymous types when using the technique discussed in the &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/a&gt;. For example…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; records = &lt;span style="color:blue"&gt;from&lt;/span&gt; order &lt;span style="color:blue"&gt;in&lt;/span&gt; resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;where&lt;/span&gt; (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;] == &lt;span style="color:#a31515"&gt;"UK"&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;select&lt;/span&gt;
			&lt;span style="color:blue"&gt;new&lt;br/&gt;&lt;/span&gt;              {&lt;br/&gt;                  ShipName = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Name"&lt;/span&gt;],&lt;br/&gt;                  ShipAddress = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Address"&lt;/span&gt;],&lt;br/&gt;                  ShipCity = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship City"&lt;/span&gt;],&lt;br/&gt;                  ShipPostalCode = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Postal Code"&lt;/span&gt;],&lt;br/&gt;                  ShipCountry = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;],&lt;br/&gt;                  ShipVia = (&lt;span style="color:blue"&gt;int&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Via"&lt;/span&gt;]&lt;br/&gt;              };&lt;br/&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The verbosity is necessary because "&lt;strong&gt;order&lt;/strong&gt;" in the above LINQ statement is of type &lt;strong&gt;SqlCeUpdatableRecord&lt;/strong&gt;. Although Visual Studio supports generating typed-wrappers for &lt;strong&gt;SqlCeResultSet&lt;/strong&gt;, it doesn't generate wrappers for the &lt;strong&gt;SqlCeUpdatableRecord&lt;/strong&gt; corresponding to the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt;. With that being the case, specifying the individual column values within the anonymous type declaration requires you to use either the indexer (or &lt;strong&gt;Getxxx&lt;/strong&gt; functions).
&lt;/p&gt;&lt;p&gt;Ultimately there's nothing we can do about the way the column values are accessed (unless you write your own typed-wrapper generator for &lt;strong&gt;SqlCeUpdatableRecord&lt;/strong&gt;). What we can do is move the code that creates the anonymous type into a separate function.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;object&lt;/span&gt; ShippingColumns(&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt; order)&lt;br/&gt;{&lt;br/&gt;
			&lt;span style="color:blue"&gt;return&lt;/span&gt;
			&lt;span style="color:blue"&gt;new&lt;br/&gt;&lt;/span&gt;    {&lt;br/&gt;        ShipName = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Name"&lt;/span&gt;],&lt;br/&gt;        ShipAddress = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Address"&lt;/span&gt;],&lt;br/&gt;        ShipCity = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship City"&lt;/span&gt;],&lt;br/&gt;        ShipPostalCode = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Postal Code"&lt;/span&gt;],&lt;br/&gt;        ShipCountry = (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;],&lt;br/&gt;        ShipVia = (&lt;span style="color:blue"&gt;int&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Via"&lt;/span&gt;]&lt;br/&gt;    };&lt;br/&gt;}&lt;br/&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;With that, the LINQ statement becomes very simple.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; records = &lt;span style="color:blue"&gt;from&lt;/span&gt; order &lt;span style="color:blue"&gt;in&lt;/span&gt; resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;where&lt;/span&gt; (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;] == &lt;span style="color:#a31515"&gt;"UK"&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;select&lt;/span&gt; ShippingColumns(order);&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;Once we move the anonymous type declaration to a separate function we can take things one step further and optimize the column access by caching the column ordinals and then retrieving the column values using the &lt;strong&gt;Getxxx&lt;/strong&gt; functions. 
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;object&lt;/span&gt; ShippingColumns(&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt; order)&lt;br/&gt;{&lt;br/&gt;
			&lt;span style="color:blue"&gt;if&lt;/span&gt; (_nameIndex == -1)&lt;br/&gt;        InitializeIndexes(order);&lt;br/&gt;&lt;br/&gt;
			&lt;span style="color:blue"&gt;return&lt;/span&gt;
			&lt;span style="color:blue"&gt;new&lt;br/&gt;&lt;/span&gt;    {&lt;br/&gt;        ShipName = order.GetString(_nameIndex),&lt;br/&gt;        ShipAddress = order.GetString(_addressIndex),&lt;br/&gt;        ShipCity = order.GetString(_cityIndex),&lt;br/&gt;        ShipPostalCode = order.GetString(_postalCodeIndex),&lt;br/&gt;        ShipCountry = order.GetString(_countryIndex),&lt;br/&gt;        ShipVia = order.GetInt32(_viaIndex)&lt;br/&gt;    };&lt;br/&gt;}&lt;br/&gt;&lt;span style="color:blue"&gt;&lt;br/&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;void&lt;/span&gt; InitializeIndexes(&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt; record)&lt;br/&gt;{&lt;br/&gt;    _nameIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship Name"&lt;/span&gt;);&lt;br/&gt;    _addressIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship Address"&lt;/span&gt;);&lt;br/&gt;    _cityIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship City"&lt;/span&gt;);&lt;br/&gt;    _postalCodeIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship Postal Code"&lt;/span&gt;);&lt;br/&gt;    _countryIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;);&lt;br/&gt;    _viaIndex = record.GetOrdinal(&lt;span style="color:#a31515"&gt;"Ship Via"&lt;/span&gt;);&lt;br/&gt;}&lt;br/&gt;&lt;span style="color:blue"&gt;&lt;br/&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _nameIndex = -1;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _addressIndex = -1;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _cityIndex = -1;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _postalCodeIndex = -1;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _countryIndex = -1;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;int&lt;/span&gt; _viaIndex = -1;&lt;br/&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;Although not a huge performance increase, storing the column indices does eliminate the overhead of the indexer looking up the column name each time. More importantly, using the strongly-typed &lt;strong&gt;Getxxx&lt;/strong&gt; functions eliminates the overhead of boxing any column values that are value-types. As you know, excessive boxing creates a lot of scrap objects which leads to increased memory and garbage collection overhead.
&lt;/p&gt;&lt;p&gt;Using regular class methods like those above work just fine; however, if you find that you use a common anonymous type throughout different parts of your application, you may want to use an extension method – extension methods are also nice just because of their class-member-like syntax.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt;
			&lt;span style="color:blue"&gt;static&lt;/span&gt;
			&lt;span style="color:blue"&gt;class&lt;/span&gt;
			&lt;span style="color:#2b91af"&gt;ResultSetExtension&lt;br/&gt;&lt;/span&gt;{&lt;br/&gt;
			&lt;span style="color:blue"&gt;public&lt;/span&gt;
			&lt;span style="color:blue"&gt;static&lt;/span&gt;
			&lt;span style="color:#2b91af"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt;&amp;gt; Where(&lt;br/&gt;
			&lt;span style="color:blue"&gt;this&lt;/span&gt;
			&lt;span style="color:#2b91af"&gt;SqlCeResultSet&lt;/span&gt; resultSet, &lt;span style="color:#2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt;, &lt;span style="color:blue"&gt;bool&lt;/span&gt;&amp;gt; theFunc)&lt;br/&gt;    {&lt;br/&gt;
			&lt;span style="color:blue"&gt;return&lt;/span&gt;
			&lt;span style="color:blue"&gt;new&lt;/span&gt;
			&lt;span style="color:#2b91af"&gt;PrepAwareEnumerableWrapper&lt;/span&gt;(resultSet, theFunc);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;
			&lt;span style="color:blue"&gt;public&lt;/span&gt;
			&lt;span style="color:blue"&gt;static&lt;/span&gt;
			&lt;span style="color:blue"&gt;object&lt;/span&gt; ShippingColumns(&lt;span style="color:blue"&gt;this&lt;/span&gt;
			&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt; order)&lt;br/&gt;    {&lt;br/&gt;
			&lt;span style="color:blue"&gt;if&lt;/span&gt; (_nameIndex == -1)&lt;br/&gt;            InitializeIndexes(order);&lt;br/&gt;&lt;br/&gt;
			&lt;span style="color:blue"&gt;return&lt;/span&gt;
			&lt;span style="color:blue"&gt;new&lt;br/&gt;&lt;/span&gt;        {&lt;br/&gt;            ShipName = order.GetString(_nameIndex),&lt;br/&gt;            ShipAddress = order.GetString(_addressIndex),&lt;br/&gt;            ShipCity = order.GetString(_cityIndex),&lt;br/&gt;            ShipPostalCode = order.GetString(_postalCodeIndex),&lt;br/&gt;            ShipCountry = order.GetString(_countryIndex),&lt;br/&gt;            ShipVia = order.GetInt32(_viaIndex)&lt;br/&gt;        };&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;&lt;span style="color:blue"&gt;private&lt;/span&gt;
			&lt;span style="color:blue"&gt;void&lt;/span&gt; InitializeIndexes(&lt;span style="color:#2b91af"&gt;SqlCeUpdatableRecord&lt;/span&gt; record) { ... }&lt;br/&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;With the extension method, the LINQ statement becomes…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; records = &lt;span style="color:blue"&gt;from&lt;/span&gt; order &lt;span style="color:blue"&gt;in&lt;/span&gt; resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;where&lt;/span&gt; (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;] == &lt;span style="color:#a31515"&gt;"UK"&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;select&lt;/span&gt; order.ShippingColumns();&lt;br/&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;A couple of notes before I finish up… 
&lt;/p&gt;&lt;p&gt;One thing to keep in mind is that all of these functions that create the anonymous type have a return type of &lt;strong&gt;object&lt;/strong&gt;. This means that the &lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt; collection that is created by the LINQ statement will be of type &lt;strong&gt;IEnumerable&amp;lt;object&amp;gt;&lt;/strong&gt; rather than &lt;strong&gt;IEnumerable&amp;lt;&lt;em&gt;compiler_generated_type&lt;/em&gt;&amp;gt;&lt;/strong&gt;. In most cases this difference does not matter but it is something to be aware of.
&lt;/p&gt;&lt;p&gt;And for a final note, if you do find yourself returning the same anonymous type construct from a number of LINQ statements, you might want to consider defining an explicit type and then constructing instances of that type within the LINQ statement. In my experience, anytime I find myself using an anonymous type/function/etc. more than once or twice that I ultimately end up needing access to it in my code in a non-anonymous fashion.
&lt;/p&gt;&lt;p&gt;To return a specific type from a LINQ statement, simply define a type that has a constructor that accepts a &lt;strong&gt;SqlCeUpdatableRecord&lt;/strong&gt; and assigns the desired columns to the corresponding type members – basically the constructor will look like the &lt;strong&gt;ShippingColumns&lt;/strong&gt; methods shown above. Assuming that you've defined a class named &lt;strong&gt;ShipInfo&lt;/strong&gt; with the appropriate constructor, your LINQ statement would look like the following…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; records = &lt;span style="color:blue"&gt;from&lt;/span&gt; order &lt;span style="color:blue"&gt;in&lt;/span&gt; resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;where&lt;/span&gt; (&lt;span style="color:blue"&gt;string&lt;/span&gt;)order[&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;] == &lt;span style="color:#a31515"&gt;"UK"&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;select new&lt;/span&gt; ShipInfo(order);&lt;br/&gt;&lt;/span&gt;
	&lt;/p&gt;&lt;p&gt;I've updated one of the samples from the original &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/a&gt; to include examples of what we've talked about in this post. If you'd like the updated sample, you can &lt;a href="http://jwhh.com/Downloads/LinqSscFollowUp.zip"&gt;&lt;strong&gt;download it from here&lt;/strong&gt;&lt;/a&gt;. The methods you'll want to look at in the download are &lt;strong&gt;menuRedefineType_Click&lt;/strong&gt;, &lt;strong&gt;menuDynamicType_Click&lt;/strong&gt;, &lt;strong&gt;menuDynamicTypeExtMethod_Click&lt;/strong&gt; all of which are in the Form1.cs source file. 
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50753" width="1" height="1"&gt;</description></item><item><title>Stop the Lies! … Pentagon issuing Windows Mobile-based lie detectors</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/09/50690.aspx</link><pubDate>Wed, 09 Apr 2008 14:34:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50690</guid><dc:creator>jim-wilson</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50690</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/09/50690.aspx#comments</comments><description>&lt;P&gt;I came across this article: &lt;A href="http://www.msnbc.msn.com/id/23926278/"&gt;New anti-terror weapon: Hand-held lie detector&lt;/A&gt; on MSNBC today. &lt;/P&gt;
&lt;P&gt;The article talks about a new hand-held lie detector that the Pentagon is issuing to soldiers in Afghanistan to help in screening local-police, interpreters, etc. &lt;/P&gt;
&lt;P&gt;I couldn't find Microsoft or Windows Mobile mentioned anywhere in the article but take a look at this picture of the application screen &amp;#8230; &lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;
&lt;TABLE style="BORDER-COLLAPSE: collapse" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 334px"&gt;
&lt;COL style="WIDTH: 304px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px" vAlign=center&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG src="http://jwhh.com/images/PentagonLieDetector.jpg"&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px" vAlign=center&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;The tell-tale Start icon appears in the top-left corner, and the familiar network activity and sound icons followed by the time appear in the top-right corner. &lt;/P&gt;
&lt;P&gt;Something that I found funny &amp;#8230; For an overview of the tool, the Pentagon has made &lt;A href="http://msnbcmedia.msn.com/i/msnbc/Sections/NEWS/080409_PCASS_PowerPoints.pdf"&gt;a PowerPoint presentation&lt;/A&gt; available. &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;All joking aside, it's really cool to see Windows Mobile being used in such a critical application &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50690" width="1" height="1"&gt;</description></item><item><title>Problem creating data-bound DataGrid in Device Project</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/08/50683.aspx</link><pubDate>Tue, 08 Apr 2008 14:32:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50683</guid><dc:creator>jim-wilson</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50683</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/04/08/50683.aspx#comments</comments><description>&lt;P&gt;The other day while working in Visual Studio 2008, I encountered an unexpected error while attempting to create a DataGrid by dragging a table from the Data Sources pane onto a form (something we've all done many times). &lt;/P&gt;
&lt;P&gt;At first Visual Studio appeared to be creating the DataGrid and associated components (BindingSource, TableAdapter, etc.) correctly but then Visual Studio threw an error: &lt;/P&gt;
&lt;DIV style="TEXT-ALIGN: center"&gt;
&lt;TABLE style="BORDER-COLLAPSE: collapse" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 360px"&gt;
&lt;COL style="WIDTH: 379px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR&gt;
&lt;TD style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px" vAlign=center colSpan=2&gt;
&lt;P&gt;&lt;STRONG&gt;An error occurred while performing the drop: &lt;BR&gt;&lt;BR&gt;Length cannot be less than zero. &lt;BR&gt;Parameter name: length&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px" vAlign=center&gt;
&lt;P style="TEXT-ALIGN: center"&gt;&lt;IMG src="http://jwhh.com/images/AnErrorOccurredWhilePerformingTheDrop.jpg"&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;The error message might have been useful if I had access to the Visual Studio source code &amp;#8211; but I was just using Visual Studio, not building it. Needless to say, the error message was of little help. &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; So I did what we all do in such situations, used trial-and-error. &lt;/P&gt;
&lt;P&gt;The project calls a WCF service through a proxy generated by NetCfSvcUtil.exe; as an experiment, I decided to remove the WCF proxy from the project (and any calls to the proxy) to see what happened. &lt;/P&gt;
&lt;P&gt;&amp;#8230; VOILA &amp;#8230; &lt;/P&gt;
&lt;P&gt;Visual Studio was then able to create the DataGrid with no problem. &lt;/P&gt;
&lt;P&gt;To verify what I had observed, I added the WCF proxy (and any associated calls) back into the project and deleted the DataGrid. Just as before, when I tried to create the DataGrid, Visual Studio threw the same error &amp;#8211; so now I know where to start looking for the problem. &lt;/P&gt;
&lt;P&gt;When I checked out the source file for the WCF proxy I realized that there was no namespace declaration. As you may know, if you run the NetCFSvcUtil without specifying the "/namespace" option then the types are not placed within a namespace&amp;#8230;. &lt;/P&gt;
&lt;P&gt;So as an attempt at a solution, I created the WCF proxy so that the contained types were in a namespace (and added the appropriate using statement to the form class) &amp;#8211; I then deleted the DataGrid from the form. Now when I dragged the table from the DataSource pane to the form, the DataGrid was created without any trouble - putting the types in a namespace completely resolved the problem. The program also compiles and runs as expected. &lt;/P&gt;
&lt;P&gt;Now things are working &amp;#8211; My assumption at this point was that there must have been a type name conflict (or something similar) between the WCF proxy types and the DataGrid-related types; seemed a reasonable assumption. &lt;/P&gt;
&lt;P&gt;&amp;#8230; BUT&amp;#8230; here's the thing &amp;#8230; &lt;/P&gt;
&lt;P&gt;To confirm my assumption about the name conflict, I created the WCF proxy so that the contained types were &lt;EM&gt;not&lt;/EM&gt; in a namespace (and of course removed the associated using statements) but left the generated DataGrid place. If there were a type name conflict between the DataGrid-related types and the WCF proxy the compiler should report the error &lt;/P&gt;
&lt;P&gt;&amp;#8230; BUT &amp;#8230; get this &amp;#8230; &lt;/P&gt;
&lt;P&gt;The code compiles and runs perfectly --- the namespace was required for Visual Studio to create the DataGrid (and/or associated components) but the namespace is not required for the code to compile and run -- what?!?! &lt;/P&gt;
&lt;P&gt;So what does this all mean? &amp;#8230; At this point my guess is that Visual Studio and the DataGrid creation process have a type name sensitivity that may not be consistent with the .NET CF language requirements. If that is the case it would appear to indicate a possible bug but can't be 100% certain until the problem is narrowed down specifically. &lt;/P&gt;
&lt;P&gt;I haven't had a chance to narrow down things further quite yet but I hopefully will shortly. As soon as I have the answer I'll post it here. &lt;/P&gt;
&lt;P&gt;One thing to keep in mind, if you do run into the error I describe above, look for any possible name conflicts or classes outside of a namespace. It seems that there's a good chance that that's the source of the problem. &lt;/P&gt;
&lt;P&gt;I hope to have more to report soon. &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50683" width="1" height="1"&gt;</description></item><item><title>OT: Fun Cat Videos</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/27/50559.aspx</link><pubDate>Thu, 27 Mar 2008 17:43:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50559</guid><dc:creator>jim-wilson</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50559</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/27/50559.aspx#comments</comments><description>&lt;P&gt;A short divergence from my regular technical posts...&lt;/P&gt;
&lt;P&gt;If you have a cat, you can't help but laugh due to the insane accuracy of these videos&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;Simon's Cat in Cat Man Do&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;
&lt;OBJECT height=355 width=425&gt;&lt;PARAM NAME="movie" VALUE="http://www.youtube.com/v/w0ffwDYo00Q"&gt;&lt;PARAM NAME="wmode" VALUE="transparent"&gt;
&lt;embed src="http://www.youtube.com/v/w0ffwDYo00Q" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/OBJECT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=4&gt;&lt;STRONG&gt;Simon's Cat in Let Me In&lt;/STRONG&gt;&lt;BR&gt;&lt;/FONT&gt;
&lt;OBJECT height=355 width=425&gt;&lt;PARAM NAME="movie" VALUE="http://www.youtube.com/v/4rb8aOzy9t4"&gt;&lt;PARAM NAME="wmode" VALUE="transparent"&gt;
&lt;embed src="http://www.youtube.com/v/4rb8aOzy9t4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/OBJECT&gt;&lt;/P&gt;
&lt;P&gt;Videos are originally from &amp;#8220;&lt;A href="http://fourfurrycats.blogspot.com/"&gt;And then there were four&lt;/A&gt;&amp;#8221;&lt;/P&gt;
&lt;P&gt;For other fun cat content checkout &lt;A href="http://buzznmeep.blogspot.com/"&gt;Buzzerbee's blog&amp;nbsp;&lt;/A&gt; and the many other sites it links to.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50559" width="1" height="1"&gt;</description></item><item><title>Looks like Flash-Lite still has a strong mobile story</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/21/50526.aspx</link><pubDate>Fri, 21 Mar 2008 11:38:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50526</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50526</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/21/50526.aspx#comments</comments><description>&lt;p&gt;A couple of weeks ago there were indications that Adobe's hope for continued adoption of Flash-Lite on mobile devices was possibly in jeopardy. 
&lt;/p&gt;&lt;p&gt;First there was the &lt;a href="http://www.microsoft.com/presspass/press/2008/mar08/03-05MIX08PR.mspx?rss_fdn=Press%20Releases"&gt;Microsoft MIX08 announcement of Silverlight for Mobile&lt;/a&gt; which, of course, competes with Flash-Lite; then Steve Jobs said that &lt;a href="http://www.marketwatch.com/news/story/adobes-flash-player-not-suited/story.aspx?guid=%7BEC690213-1B82-4A51-9D63-028BE06EC44C%7D"&gt;Flash-Lite didn't offer the power that iPhone requires&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;Oh but how quickly things change…
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;On Monday Adobe announced: &lt;a href="http://www.cio-today.com:80/news/Microsoft-Licenses-Flash-Lite/story.xhtml?story_id=101009XJYDSX"&gt;Microsoft Licenses Flash Lite for Windows Mobile Users&lt;/a&gt;
		&lt;/li&gt;&lt;li&gt;Then on Wednesday, thanks to the release of the iPhone SDK: &lt;a href="http://www.engadget.com/2008/03/19/adobe-says-flash-is-coming-to-the-iphone/"&gt;Adobe says Flash is coming to the iPhone&lt;/a&gt;
		&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It certainly is an exciting time to be a mobile device developer. &lt;span style="font-family:Wingdings"&gt;J&lt;/span&gt;
	&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50526" width="1" height="1"&gt;</description></item><item><title>Automating the process of associating the Device Emulator with the Cellular Emulator</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/18/50513.aspx</link><pubDate>Tue, 18 Mar 2008 17:19:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50513</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50513</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/18/50513.aspx#comments</comments><description>&lt;P&gt;If you do much work with Windows Mobile applications, there's a good chance that you frequently use the Cellular Emulator to test out things like call handling, SMS message handling, as well as cellular network behavior. I'm a pretty big fan of the Cellular Emulator &amp;#8230; I remember what it was not that long ago when we didn't have it &amp;#8230; that said &amp;#8230; &lt;/P&gt;
&lt;P&gt;There is one thing that I do sometimes find bothersome (yes I know this is a very small thing) &amp;#8211; it's the process of associating the Cellular Emulator with a Device Emulator. You have to: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open the Device Emulator Configuration dialog 
&lt;LI&gt;Select the Peripherals tab 
&lt;LI&gt;Enter the Cellular Emulator COMx port number into the Serial Port 0 field 
&lt;LI&gt;Dismiss the Configuration Dialog 
&lt;LI&gt;Reset the Device Emulator by selecting &lt;STRONG&gt;File&lt;/STRONG&gt; | &lt;STRONG&gt;Reset&lt;/STRONG&gt; | &lt;STRONG&gt;Soft&lt;/STRONG&gt; 
&lt;LI&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt; to confirm the soft reset &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I realize that there are bigger problems in the world but when you test your apps across several different Device Emulators multiple times each day, that little 6-step process gets old. Fortunately, thanks to the Device Emulator Manager API one can create a little program to automate the whole process. &lt;/P&gt;
&lt;P&gt;In an attempt to be a better person and to help my fellow man &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; &amp;#8230; I thought I should share this little, but very helpful block of code. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; AssociateDeviceAndCellularEmulator(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; emulatorName, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; commPort) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IDeviceEmulatorManager emulatorManager = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; DeviceEmulatorManagerClass();&lt;BR&gt;IDeviceEmulatorManagerVMID theEmulator = &lt;A href="http://www.pluralsight.com/blogs/jimw/archive/2007/10/30/48892.aspx"&gt;FindEmulator&lt;/A&gt;(emulatorManager, emulatorName);&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;// Start the device emulator if not already running&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (theEmulator.get_State() == EMULATOR_STATE.EMU_NOT_RUNNING)&lt;BR&gt;theEmulator.Connect(); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;SetEmulatorCommPort(theEmulator, commPort); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;// Soft-Reset the Device Emulator&lt;BR&gt;&lt;/SPAN&gt;theEmulator.Reset(1);&lt;BR&gt;} &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; SetEmulatorCommPort(IDeviceEmulatorManagerVMID theEmulator, &lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; commPort)&lt;BR&gt;{&lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; originalConfigString = theEmulator.GetConfiguration();&lt;BR&gt;&lt;SPAN style="COLOR: #2b91af"&gt;XmlDocument&lt;/SPAN&gt; configXml = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;XmlDocument&lt;/SPAN&gt;();&lt;BR&gt;configXml.LoadXml(originalConfigString);&lt;BR&gt;&lt;SPAN style="COLOR: #2b91af"&gt;XmlNamespaceManager&lt;/SPAN&gt; nsManager = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;XmlNamespaceManager&lt;/SPAN&gt;(configXml.NameTable);&lt;BR&gt;nsManager.AddNamespace(&lt;SPAN style="COLOR: #a31515"&gt;"decfg"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #a31515"&gt;"http://schemas.microsoft.com/DeviceEmulator/2006/01/DeCfg"&lt;/SPAN&gt;); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: #2b91af"&gt;XmlElement&lt;/SPAN&gt; serialPort0 = (&lt;SPAN style="COLOR: #2b91af"&gt;XmlElement&lt;/SPAN&gt;) configXml.SelectSingleNode(&lt;BR&gt;&lt;SPAN style="COLOR: #a31515"&gt;"/decfg:DeviceEmulator/decfg:Peripherals/decfg:SerialPort[@UARTNumber='0']"&lt;/SPAN&gt;,&lt;BR&gt;nsManager);&lt;BR&gt;serialPort0.InnerText = commPort; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; updatedConfigString = configXml.OuterXml;&lt;BR&gt;theEmulator.SetConfiguration(updatedConfigString); &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first function takes care of starting the Device Emulator if it isn't running and doing the soft-reset of the Device Emulator. Before doing the reset, it first calls the 2&lt;SUP&gt;nd&lt;/SUP&gt; function, &lt;STRONG&gt;SetEmulatorCommPort&lt;/STRONG&gt;, which retrieves the specified Device Emulator's current configuration XML, locates the serial port 0 element, assigns the correct COMx port number, then passes the updated configuration XML back to the Device Emulator. After which, the Device Emulator is correctly associated with the Cellular Emulator and is ready to use. &lt;/P&gt;
&lt;P&gt;With these functions in place, to associate the Windows Mobile 6 Professional Emulator with the Cellular Emulator (we'll assume it requires COM4) &amp;#8211; we just make the following function call. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;AssociateDeviceAndCellularEmulator(&lt;SPAN style="COLOR: #a31515"&gt;"Windows Mobile 6 Professional Emulator"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #a31515"&gt;"COM4"&lt;/SPAN&gt;);&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;Just a little bit of code but I find it makes my day-to-day application testing a little easier. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50513" width="1" height="1"&gt;</description></item><item><title>Silverlight support for iPhone Confirmed?</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/11/50423.aspx</link><pubDate>Tue, 11 Mar 2008 17:34:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50423</guid><dc:creator>jim-wilson</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50423</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/11/50423.aspx#comments</comments><description>&lt;p&gt;According to a &lt;a href="http://www.techradar.com/news/phone-and-communications/microsoft-well-develop-silverlight-for-iphone-261080"&gt;report in techradar.com today&lt;/a&gt; … 
&lt;/p&gt;&lt;p style="margin-left: 36pt"&gt;&lt;span style="font-size:12pt"&gt;&lt;strong&gt;&lt;em&gt;"Microsoft has confirmed to TechRadar that it will look to build a version of Silverlight that will work on the iPhone"
&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I haven't seen such a commitment corroborated by any other source yet but techradar.com makes it sound pretty good. 
&lt;/p&gt;&lt;p&gt;I am a little concerned by the phrase "&lt;strong&gt;will&lt;em&gt; look to build&lt;/em&gt;&lt;/strong&gt;" – as that doesn't quite sound like a commitment on Microsoft's part – but, fingers-crossed; I hope that it's true.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50423" width="1" height="1"&gt;</description></item><item><title>Sometimes a few words are worth a 1,000 pictures</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/11/50421.aspx</link><pubDate>Tue, 11 Mar 2008 16:00:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50421</guid><dc:creator>jim-wilson</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50421</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/11/50421.aspx#comments</comments><description>&lt;p&gt;Like many, I really like the ongoing trend of providing developer-related information in the form of videos. 
&lt;/p&gt;&lt;p&gt;I suppose I'd better … although I don't know the exact count, the number of "&lt;a href="http://msdn2.microsoft.com/en-us/netframework/bb495180.aspx"&gt;How Do I Videos for Devices&lt;/a&gt;" and On-Demand Webcasts I've made total in excess of 100 – &lt;strong&gt;&lt;em&gt;BUT&lt;/em&gt;&lt;/strong&gt;, I'm a bit bothered by what appears to be a trend of delivering developer-related content in &lt;strong&gt;&lt;em&gt;only&lt;/em&gt;&lt;/strong&gt; video form.
&lt;/p&gt;&lt;p&gt;I recently needed to ramp up quickly on a particular technology and I did what I always do in such a circumstance; I tried to locate a few pieces of good content that would give me a solid foundation in the technology so I could then start writing programs to experiment with  the technology's ins-and-outs. 
&lt;/p&gt;&lt;p&gt;My search for content didn't quite go as I hoped. My problem was not that I couldn't find any content on the subject; I found quite a lot of content. The problem was that virtually all of that content was videos. There were a few papers available but they tended to focus on high-level topics and generalities; not really much I could use to start actually working with the technology.
&lt;/p&gt;&lt;p&gt;In my personal experience, I find videos useful for getting information on how to perform a particular task but I find them to be of limited value when trying to build up an overall picture of the technology. I also find that in some cases videos slow down the learning process. In the case of using papers, one can read just particular sections of interest, quickly skip past topics not of interest, and easily refer back and forth between multiple papers; all things not easily done with videos.
&lt;/p&gt;&lt;p&gt;So all of you content producers, content managers, and decision makers out there … &lt;strong&gt;&lt;em&gt;please keep written-content coming&lt;/em&gt;&lt;/strong&gt;. 
&lt;/p&gt;&lt;p&gt;Written content and videos are fantastic compliments to one another … they're not replacements.
&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;  &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50421" width="1" height="1"&gt;</description></item><item><title>LINQ on Mobile Devices – Some Big Surprises from Visual Basic … Part 2 (continuing the story of improved SqlCeResultSet LINQ query efficiency)</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/03/50362.aspx</link><pubDate>Mon, 03 Mar 2008 16:45:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50362</guid><dc:creator>jim-wilson</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50362</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/03/03/50362.aspx#comments</comments><description>&lt;p&gt;As you'll recall from &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/28/50337.aspx"&gt;my last post&lt;/a&gt;, we were talking about some of Visual Basic's unexpected behavior when compiling and resolving method signatures in LINQ queries. Hopefully, most of you will also recall, where this all started … &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;the webcast discussion&lt;/a&gt; of using extension methods to efficiently query data held in a SQL Server Compact (SSC) database with LINQ rather than incur the overhead of loading that data into a &lt;strong&gt;DataSet&lt;/strong&gt;. &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx"&gt;This post shows the difference in resource usage&lt;/a&gt; between using &lt;strong&gt;DataSets&lt;/strong&gt; for LINQ queries and direct database LINQ queries through "smart" &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; handing. 
&lt;/p&gt;&lt;p&gt;So building on our observations in &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/28/50337.aspx"&gt;my previous post&lt;/a&gt; as to how VB is handling LINQ queries and the difficulties we observed that this creates when using custom extension methods, the following describes how I worked around the issues so we can employ &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; LINQ query optimizations in VB similar to those we observed in C#.
&lt;/p&gt;&lt;p&gt;(see &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx"&gt;this post for C# code examples&lt;/a&gt; and &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/28/50337.aspx"&gt;this post for VB code examples&lt;/a&gt;)
&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Arial"&gt;&lt;span style="font-size:14pt"&gt;&lt;strong&gt;A Quick Review of the Problem &lt;/strong&gt;&lt;/span&gt;&lt;span style="font-size:9pt"&gt;
			&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SqlCeResultSet&lt;/strong&gt; implements the older object-based &lt;strong&gt;IEnumerable &lt;/strong&gt;interface rather than the more modern generic &lt;strong&gt;IEnumerable(of T)&lt;/strong&gt; interface. We observed that when a class implements the older &lt;strong&gt;IEnumerable&lt;/strong&gt; interface that the VB compiler appears to force the creation of a &lt;strong&gt;IEnumerable(of Object)&lt;/strong&gt; wrapper over the class reference by way of a call to the &lt;strong&gt;Cast(of Object)&lt;/strong&gt; extension method. As a result, the reference resolves to the built-in &lt;strong&gt;Where&lt;/strong&gt; extension method that accepts &lt;strong&gt;IEnumerable(of T)&lt;/strong&gt; rather than to our custom &lt;strong&gt;Where&lt;/strong&gt; extension method that accepts a &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; reference.
&lt;/p&gt;&lt;p&gt;&lt;span style="color:black; font-family:Arial"&gt;&lt;span style="font-size:14pt"&gt;&lt;strong&gt;Working Out a Solution &lt;/strong&gt;&lt;/span&gt;&lt;span style="font-size:9pt"&gt;
			&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;When working out the optimized &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; LINQ query solution, I wanted to insure that the solution had minimal impact on how you write your code. I wanted to be able to use the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; class just as it is (no new derived class, etc.) and I wanted to be able to use the same LINQ query syntax that we use for other LINQ queries. 
&lt;/p&gt;&lt;p&gt;With that in mind, the following is the solution I was able to work out for VB. It is certainly not the only solution to the problem and may not be the best solution. I do feel, however, that it is a reasonable solution.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:12pt"&gt;&lt;strong&gt;Getting past the IEnumerable Problem
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Because the VB compiler appears to intercede and immediately wrap the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; instance in a &lt;strong&gt;IEnumberable(of Object)&lt;/strong&gt; collection before resolving the &lt;strong&gt;Where&lt;/strong&gt; extension method, I had to identify an easy way to short-circuit this behavior. I figured the easiest way to do this was to create a simple wrapper class that would basically allow me to hide the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; from the VB compiler long enough for the compiler to select my custom &lt;strong&gt;Where&lt;/strong&gt; extension method rather than the built-in &lt;strong&gt;IEnumberable(ofT)&lt;/strong&gt; version.
&lt;/p&gt;&lt;p&gt;To do this, I defined the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Class&lt;/span&gt; VBLinqHandlingWorkAround&lt;br/&gt;
			&lt;span style="color:blue"&gt;Implements&lt;/span&gt; IEnumerable(&lt;span style="color:blue"&gt;Of&lt;/span&gt; SqlCeUpdatableRecord)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub&lt;/span&gt;
			&lt;span style="color:blue"&gt;New&lt;/span&gt;(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; resultSet &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlCeResultSet)&lt;br/&gt;        _resultSet = resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Sub
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;Private&lt;/span&gt; _resultSet &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlCeResultSet
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;ReadOnly&lt;/span&gt;
			&lt;span style="color:blue"&gt;Property&lt;/span&gt; ResultSet() &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlCeResultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;Get&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt; _resultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Get&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Property
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt; GetEnumerator() &lt;span style="color:blue"&gt;As&lt;/span&gt; System.Collections.Generic.IEnumerator(&lt;span style="color:blue"&gt;Of&lt;/span&gt; System.Data.SqlServerCe.SqlCeUpdatableRecord) &lt;span style="color:blue"&gt;Implements&lt;/span&gt; System.Collections.Generic.IEnumerable(&lt;span style="color:blue"&gt;Of&lt;/span&gt; System.Data.SqlServerCe.SqlCeUpdatableRecord).GetEnumerator&lt;br/&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt;
			&lt;span style="color:blue"&gt;Nothing&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt; GetEnumerator1() &lt;span style="color:blue"&gt;As&lt;/span&gt; System.Collections.IEnumerator &lt;span style="color:blue"&gt;Implements&lt;/span&gt; System.Collections.IEnumerable.GetEnumerator&lt;br/&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt;
			&lt;span style="color:blue"&gt;Nothing&lt;br/&gt;&lt;/span&gt;
			&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;br/&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Class
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I then defined an extension method, &lt;strong&gt;GetVBLinqHandlingWorkAround&lt;/strong&gt;…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&amp;lt;Extension()&amp;gt; _&lt;br/&gt;&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt; GetVBLinqHandlingWorkAround(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; resultSet &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlCeResultSet) &lt;span style="color:blue"&gt;As&lt;/span&gt; VBLinqHandlingWorkAround&lt;br/&gt;    Debug.WriteLine(&lt;span style="color:#a31515"&gt;"GetVBLinqHandlingWorkAround(this SqlCeResultSet resultSet"&lt;/span&gt;)&lt;br/&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt;
			&lt;span style="color:blue"&gt;New&lt;/span&gt; VBLinqHandlingWorkAround(resultSet) &lt;span style="color:green"&gt;' Wraps the SqlCeResult&lt;br/&gt;&lt;/span&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;With the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class and the &lt;strong&gt;GetVBLinqHandlingWorkAround&lt;/strong&gt; extension method in place, I modified the actual LINQ query just slightly…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;Dim&lt;/span&gt; records = &lt;span style="color:blue"&gt;From&lt;/span&gt; order &lt;span style="color:blue"&gt;In&lt;/span&gt; resultSet.&lt;span style="background-color:yellow"&gt;&lt;strong&gt;&lt;em&gt;GetVBLinqHandlingWorkAround()&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt; _&lt;br/&gt;
			&lt;span style="color:blue"&gt;Where&lt;/span&gt; order(&lt;span style="color:#a31515"&gt;"Ship Country"&lt;/span&gt;) = &lt;span style="color:#a31515"&gt;"UK"&lt;/span&gt;&lt;span style="color:green"&gt;
			&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;By calling the &lt;strong&gt;GetVBLinqHandlingWorkAround&lt;/strong&gt; method, the type being queried is the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class which implements &lt;strong&gt;IEnumerable(of&lt;/strong&gt;
		&lt;strong&gt;SqlCeUpdatableRecord)&lt;/strong&gt;. By implementing the strongly-typed &lt;strong&gt;IEnumerable(of T)&lt;/strong&gt;, the VB compiler does not wrap the class reference in a new collection as it did with the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt;. So the type being queried is &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; which internally contains a reference to the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt;.
&lt;/p&gt;&lt;p&gt;Notice that the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class doesn't actually implement an enumerator; we have to provide the empty &lt;strong&gt;IEnumerable(of T)&lt;/strong&gt; implementation so that the VB compiler will accept that the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class can be queried. As you recall from Example 1 in &lt;a href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/28/50337.aspx"&gt;my previous post&lt;/a&gt;, without the interface implementation VB considers the type illegal to query even though there's a &lt;strong&gt;Where&lt;/strong&gt; extension method available for the type (C# does not enforce such a requirement).
&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:12pt"&gt;&lt;strong&gt;Accessing the SqlCeResultSet Custom Where Extension Method
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Because the type being queried remains the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; class, we can provide a custom &lt;strong&gt;Where&lt;/strong&gt; extension method that accepts the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; reference…
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&amp;lt;Extension()&amp;gt; &lt;br/&gt;_&lt;span style="color:blue"&gt;Public&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function&lt;/span&gt; Where(&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; workAroundReference &lt;span style="color:blue"&gt;As&lt;/span&gt; VBLinqHandlingWorkAround, _&lt;br/&gt;
			&lt;span style="color:blue"&gt;ByVal&lt;/span&gt; theFunc &lt;span style="color:blue"&gt;As&lt;/span&gt; Func(&lt;span style="color:blue"&gt;Of&lt;/span&gt; SqlCeUpdatableRecord, &lt;span style="color:blue"&gt;Boolean&lt;/span&gt;)) _&lt;br/&gt;
			&lt;span style="color:blue"&gt;As&lt;/span&gt; IEnumerable(&lt;span style="color:blue"&gt;Of&lt;/span&gt; SqlCeUpdatableRecord)&lt;br/&gt;
			&lt;span style="color:blue"&gt;Dim&lt;/span&gt; resultSet &lt;span style="color:blue"&gt;As&lt;/span&gt; SqlCeResultSet = workAroundReference.ResultSet&lt;br/&gt;
			&lt;span style="color:blue"&gt;Return&lt;/span&gt; resultSet.Where(theFunc)&lt;br/&gt;&lt;span style="color:blue"&gt;End&lt;/span&gt;
			&lt;span style="color:blue"&gt;Function
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Notice what this custom &lt;strong&gt;Where&lt;/strong&gt; extension method does. It simply accesses the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; reference contained within the &lt;strong&gt;VBLinqHandlingWorkAround&lt;/strong&gt; instance and then uses the method syntax to call the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt;
		&lt;strong&gt;Where&lt;/strong&gt; extension method. And &lt;em&gt;viola&lt;/em&gt;, we're now using our "smart" &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; LINQ query implementation.
&lt;/p&gt;&lt;p&gt;When I first designed the &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; optimized query solution I was working in C#. One of the things I had found so elegant about the optimized &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; query solution was the fact that it didn't require any changes to the actual LINQ query. As I so far understand the behavior of the VB compiler when working with LINQ queries, we're not able to achieve that same degree of invisible integration. That said, given the huge payoff in query performance and resource efficiency when using the "smart" &lt;strong&gt;SqlCeResultSet&lt;/strong&gt; query solution, having to include the &lt;strong&gt;GetVbLinqHandlingWorkAround&lt;/strong&gt; method call in the query is a pretty small price to pay. &lt;span style="font-family:Wingdings"&gt;J&lt;/span&gt;
	&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50362" width="1" height="1"&gt;</description></item><item><title>LINQ on Mobile Devices – Some Big Surprises from Visual Basic</title><link>http://www.pluralsight.com/community/blogs/jimw/archive/2008/02/28/50337.aspx</link><pubDate>Fri, 29 Feb 2008 01:57:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:50337</guid><dc:creator>jim-wilson</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.pluralsight.com/community/blogs/jimw/rsscomments.aspx?PostID=50337</wfw:commentRss><comments>http://www.pluralsight.com/community/blogs/jimw/archive/2008/02/28/50337.aspx#comments</comments><description>&lt;P&gt;As you probably know&amp;#8230; &lt;A href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx"&gt;yesterday I posted the samples and some screen shots&lt;/A&gt; from my &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;LINQ on Mobile Devices webcast&lt;/A&gt;. A short time later I received feedback asking that I post VB versions of the samples. &lt;/P&gt;
&lt;P&gt;The feedback author made a very good point that these examples (especially the last one) are very difficult to translate from C# to VB if you're not already familiar with C#. Certainly a reasonable request so I figured a take an hour or two today and convert them to VB&amp;#8230; &lt;/P&gt;
&lt;P&gt;Well so much for an "hour or two" &amp;#8230; I started working on them at 10:30 AM and didn't finish until after 5:00 PM &amp;#8230; Let's just say that converting the last demo to VB was a little more than just difficult. &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; &lt;/P&gt;
&lt;P style="MARGIN-LEFT: 36pt"&gt;&lt;EM&gt;BTW: This isn't going to be a VB bash-fest where I keep touting the amazing power of the C# compiler. I will draw parallels between the two compilers just to provide a reference to an alternate implementation. In the interest of full disclosure, I will say that I do find the C# compiler's handling a of LINQ queries easier to follow than that of the VB compiler. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;Sample Downloads &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Before I go into the explanation, let me give you the links to the VB Samples first (remember the &lt;A href="http://jwhh.com/downloads/NetCFLinqMethodSupport.zip"&gt;first demo&lt;/A&gt; was already VB) &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://jwhh.com/downloads/NetCFLinqCompareDataSetResultSet-VB.zip"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Second demo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/A&gt; &amp;#8211; Shows the time and resource cost of using a DataSet as compared to a SqlCeResultSet 
&lt;LI&gt;&lt;A href="http://jwhh.com/downloads/NetCFLinqCustomEnumerator-VB.zip"&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Third demo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/A&gt; &amp;#8211; Shows the benefit of using a custom extension methods and enumerators to query the SSC database tables directly (&lt;EM&gt;Be sure to read the below explanation&lt;/EM&gt;) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx"&gt;For C# versions of the demos, see yesterday's post&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;Some Unexpected Behavior in VB's Processing of LINQ Queries &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Some of you will remember earlier this month &lt;A href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/04/50151.aspx"&gt;when I ran into what appeared to be a bug&lt;/A&gt; when performing LINQ queries against DataTables in VB &amp;#8211; as we &lt;A href="http://www.pluralsight.com/blogs/jimw/archive/2008/02/05/50160.aspx"&gt;later learned&lt;/A&gt;, it was due to subtle differences between the C# and VB compilers combined with a subtle difference between Extension Method support in .NET CF and the full framework. With that in mind, I'm going to be a little more cautious with the issue I encountered today. &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;I'm not prepared to call what I've run into a bug but I can honestly say that I encountered what I found to be very unexpected behavior when attempting to use custom Extension Methods in VB LINQ queries. Let me explain&amp;#8230; &lt;/P&gt;
&lt;P&gt;As you'll recall from the &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/A&gt;, we defined a custom &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method for SqlCeResultSet. This method allows us to provide a "smart" enumerator which we can use to expedite our queries. In VB, that extension method is declared as follows. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;lt;Extension()&amp;gt; _ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Function&lt;/SPAN&gt; Where(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; resultSet &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; SqlCeResultSet, &lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; theFunc &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; Func(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; SqlCeUpdatableRecord, &lt;SPAN style="COLOR: blue"&gt;Boolean&lt;/SPAN&gt;)) &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; IEnumerable(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; SqlCeUpdatableRecord) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;Debug.WriteLine(&lt;SPAN style="COLOR: #a31515"&gt;"Where(resultSet As SqlCeResultSet"&lt;/SPAN&gt;) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;New&lt;/SPAN&gt; PrepAwareEnumerableWrapper(resultSet, theFunc) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Function &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;When we did this in C#, our custom &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method immediately worked &amp;#8211; there were really no significant caveats. I didn't have the same experience in VB &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt;. Here's what I initially found interesting when doing this in VB &amp;#8230; using the method syntax to query the SqlCeResultSet works as expected but the query syntax won't even compile! &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;resultSet.Where(&lt;SPAN style="COLOR: blue"&gt;Function&lt;/SPAN&gt;(order) order(&lt;SPAN style="COLOR: #a31515"&gt;"Ship Country"&lt;/SPAN&gt;) = &lt;SPAN style="COLOR: #a31515"&gt;"UK"&lt;/SPAN&gt;) &lt;SPAN style="COLOR: green"&gt;' Works &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; records = &lt;SPAN style="COLOR: blue"&gt;From&lt;/SPAN&gt; order &lt;SPAN style="COLOR: blue"&gt;In&lt;/SPAN&gt; resultSet _ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Where&lt;/SPAN&gt; order(&lt;SPAN style="COLOR: #a31515"&gt;"Ship Country"&lt;/SPAN&gt;) = &lt;SPAN style="COLOR: #a31515"&gt;"UK"&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;' Won't compile?!?! &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The problem as reported by the compiler is that the query syntax is trying to use late binding &amp;#8211; the compiler believes that "&lt;EM&gt;order"&lt;/EM&gt; is of type Object rather than inferring that it's a SqlCeUpdatableRecord as expected. &lt;/P&gt;
&lt;P&gt;In order to get the method to compile, I tried declaring the data type of "order" explicitly [ &lt;EM&gt;From order as SqlCeUpdatableRecord in resultSet&lt;/EM&gt; ] &amp;#8211; I also tried letting the compiler infer the type and then using a cast in the &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; clause [&lt;EM&gt;Where DirectCast(order, SqlCeUpdatableRecord)("Ship Country") = "UK"&lt;/EM&gt; ]. But when I run the code, the program uses one of the built-in &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension methods rather than our custom &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method. &lt;/P&gt;
&lt;P&gt;Ugh! &amp;#8211; not what I was hoping for. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;Getting a Handle on the VB Compiler's Type Inference within LINQ Query Syntax &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Obviously these difficulties with the query syntax were a surprise. As I understand LINQ handling, the query syntax should be transformed into the method syntax &amp;#8211; in fact, I know that's how it works in C#. After several hours of research, I now understand that the direct query-syntax-to-method-syntax translation is sort of what happens in VB &amp;#8230; but not exactly. I think the best way to explain how things work is with some examples. &lt;/P&gt;
&lt;P&gt;Let's assume that I have a class named &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt; that represents a business object that manages lists of other subordinate business objects. The subordinate business object class is called &lt;STRONG&gt;ChildBizObject&lt;/STRONG&gt; whose definition looks like the following. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt; ChildBizObject &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;ReadOnly&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Property&lt;/SPAN&gt; SalesDivision() &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; String &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Property &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We'll query the &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt; object for a list of &lt;STRONG&gt;ChildBizObject&lt;/STRONG&gt; objects using both the method and query syntax. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; manager &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;New&lt;/SPAN&gt; BizObjectManager &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; records1 = manager.Where(&lt;SPAN style="COLOR: blue"&gt;Function&lt;/SPAN&gt;(child) child.SalesDivision = &lt;SPAN style="COLOR: #a31515"&gt;"SouthEast"&lt;/SPAN&gt;) &lt;SPAN style="COLOR: green"&gt;' method syntax &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; records2 = &lt;SPAN style="COLOR: blue"&gt;From&lt;/SPAN&gt; child &lt;SPAN style="COLOR: blue"&gt;In&lt;/SPAN&gt; manager _ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Where&lt;/SPAN&gt; child.SalesDivision = &lt;SPAN style="COLOR: #a31515"&gt;"SouthEast"&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;' query syntax &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;And we have the following &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method that we hope will be used when doing the LINQ queries. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&amp;lt;Extension()&amp;gt;_ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Function&lt;/SPAN&gt; Where(&lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; manager &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; BizObjectManager, &lt;SPAN style="COLOR: blue"&gt;ByVal&lt;/SPAN&gt; theFunc &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; Func(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; ChildBizObject, &lt;SPAN style="COLOR: blue"&gt;Boolean&lt;/SPAN&gt;)) &lt;SPAN style="COLOR: blue"&gt;As&lt;/SPAN&gt; IEnumerable(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; ChildBizObject) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Function&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;Now let's look at 3 possible ways that we might declare the &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt; class. The method syntax works with all 3 of the declarations &lt;STRONG&gt;&lt;EM&gt;but&lt;/EM&gt;&lt;/STRONG&gt; I think you'll be surprised (I certainly was) at the way the VB compiler's handling of the query syntax changes based on that declaration. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Example 1 &amp;#8211; Class implements no interfaces &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt; BizObjectManager &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In this case the VB compiler reports that the class &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt; cannot be queried. This isn't quite true. As I mentioned a few lines back, the method syntax compiles and works fine. Also, this same situation compiles and works fine in C#. The bottom-line is that there is a &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method returning an &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt; available so the class is query compatible. &lt;/P&gt;
&lt;P&gt;It appears that the VB compiler will only allow classes that implement specific interfaces to appear in the query syntax. Those interfaces include &lt;STRONG&gt;IEnumerable&lt;/STRONG&gt;, &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt;, and possibly others. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Example 2 &amp;#8211; Class implements the strongly-typed IEnumerable(of T) interface &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt; BizObjectManager &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Implements&lt;/SPAN&gt; IEnumerable(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; ChildBizObject) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So to satisfy the compiler, we have our class implement &lt;STRONG&gt;IEnumerable (of ChildBizObject)&lt;/STRONG&gt;. This code now compiles fine. But what will happen when we run the code? &lt;/P&gt;
&lt;P&gt;Since the VB compiler is requiring us to implement this interface, which &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method will it choose: the built-in &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method that accepts an &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt; or our &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method that accepts the &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt;? &lt;/P&gt;
&lt;P&gt;The standard rules for method overloading dictate that the method that most closely matches a type be used; in this case the closest match is our custom &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method. The good news is, the compiler does choose the correct &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method &amp;#8230; ours (closest type match). What that means though, is that to get past the VB compiler I had to implement &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt; even though the compiler won't actually use it. The &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt; method implementations can literally return the value "Nothing". &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;STRONG&gt;Example 3 &amp;#8211; Class implements the loosely-typed IEnumerable interface &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt; BizObjectManager &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Implements&lt;/SPAN&gt; IEnumerable &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: green"&gt;'...&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Class &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This is exactly the case with SqlCeResultSet &amp;#8211; it implements only &lt;STRONG&gt;IEnumerable&lt;/STRONG&gt; not &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt;. So just like SqlCeResultSet, the &lt;STRONG&gt;BizObjectManager&lt;/STRONG&gt; query won't compile unless we explicitly declare the type of "child" in our query or cast "child" in the &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; clause &amp;#8211; but once it compiles, when it runs it uses a built-in &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method instead of our custom &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method. &lt;/P&gt;
&lt;P&gt;What's happening in this case is that the VB compiler appears to want to bias the type towards being some version of &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt;. Let's assume that in order to get the code to compile that I've modified the query so that there's a cast in the &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; clause &amp;#8211; like the following&amp;#8230; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; records = &lt;SPAN style="COLOR: blue"&gt;From&lt;/SPAN&gt; child &lt;SPAN style="COLOR: blue"&gt;In&lt;/SPAN&gt; manager _ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Where&lt;/SPAN&gt; DirectCast(child, ChildBizObject).SalesDivision = &lt;SPAN style="COLOR: #a31515"&gt;"SouthEast"&lt;/SPAN&gt; &lt;SPAN style="COLOR: green"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The compiler then generates code similar to the following (I've simplified the code for clarity). &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;SPAN style="COLOR: blue"&gt;Dim&lt;/SPAN&gt; records = Manager.Cast(&lt;SPAN style="COLOR: blue"&gt;Of&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;Object&lt;/SPAN&gt;)().Where(DirectCast(child, ChildBizObject).SalesDivision = &lt;SPAN style="COLOR: #a31515"&gt;"SouthEast"&lt;/SPAN&gt;)&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;Basically it appears that once the VB compiler sees that the class implements the loosely-typed &lt;STRONG&gt;IEnumerable&lt;/STRONG&gt; [members are returned as object references] the compiler then calls the &lt;STRONG&gt;Cast&lt;OF Object&gt;&lt;/STRONG&gt; method which generates a new collection containing the members of the original collection but this time the collection is typed as &lt;STRONG&gt;IEnumerable(of Object)&lt;/STRONG&gt; [members are returned as &amp;#8230; object references &lt;SPAN style="FONT-FAMILY: Wingdings"&gt;J&lt;/SPAN&gt;]. I'm not sure why the compiler does this [I'd guess it's related to the same issue that causes the compiler to require that objects being queried implement &lt;STRONG&gt;IEnumerable&lt;/STRONG&gt;/&lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt;] but the net-effect is that the type being queried is now &lt;STRONG&gt;IEnumerable(of T)&lt;/STRONG&gt; and therefore the built-in &lt;STRONG&gt;&lt;EM&gt;Where&lt;/EM&gt;&lt;/STRONG&gt; extension method gets used. &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;STRONG&gt;OK &amp;#8230; So How'd You Get the SqlCeResultSet-based Extension Method to Work in VB &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I don't mean to leave you hanging but this post is already so much longer than I wanted it to be &amp;#8211; I'm going to call it a night here and post the details of how I worked around the issue tomorrow. &lt;/P&gt;
&lt;P&gt;If you just can't wait, you can download the &lt;A href="http://jwhh.com/downloads/NetCFLinqCustomEnumerator-VB.zip"&gt;VB version of Demo three&lt;/A&gt; and checkout the code directly. &lt;/P&gt;
&lt;P&gt;Oh &amp;#8230; I wanted to mention that the &lt;A href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&amp;amp;EventID=1032358820"&gt;webcast&lt;/A&gt; that goes with all of this is now available On-Demand. &lt;/P&gt;
&lt;P&gt;See ya tomorrow.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=50337" width="1" height="1"&gt;</description></item></channel></rss>