<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>@ Head : .NET 4.0</title><link>http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx</link><description>Tags: .NET 4.0</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>VB Quark #7 : Optional Parameters and Dates</title><link>http://msmvps.com/blogs/bill/archive/2011/11/09/vb-quark-7-optional-parameters-and-dates.aspx</link><pubDate>Wed, 09 Nov 2011 04:14:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1802239</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1802239</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/11/09/vb-quark-7-optional-parameters-and-dates.aspx#comments</comments><description>&lt;p&gt;Hopefully you already know VB has full support for Optional parameters, both declaring them and calling them, but did you know you can use Dates as Optional parameters ?&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Sub&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; AddNewCustomer(customer &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Customer&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Optional&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dateAdded &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Date&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Nothing&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dateAdded = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Nothing&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dateAdded = Now&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt; VB has had this support for Optional parameters in place for the last decade or so in .NET and for years before that back in the COM versions of VB. &lt;/p&gt;  &lt;p&gt;In the last release of .NET (VS 2010), C# finally got support for Optional parameters, so the above in C# would look like:&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; AddNewCustomer(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Customer&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; customer,&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dateAdded = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;default&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;))         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (dateAdded == &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;default&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;)) dateAdded = &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;DateTime&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Now;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The Nothing in the VB declaration is the same as default(DateTime) in C#, which equates to the theoretical Gregorian date of 1/1/0001.&lt;/p&gt;  &lt;p&gt;But what if you want to specify a default date ? Well because VB supports date literals, in VB you can, but in C# you can’t.&amp;#160; In VB you can write any date literal for the optional parameter value. For example, you might have some legacy database support, and when the date is unknown you want to use the equivalent of an OLE Date’s zero value:&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Sub&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; AddNewCustomer(customer &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Customer&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;,         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Optional&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dateAdded &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Date&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = #12/30/1899#)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When the VB compiler compiles this, it adds a System.Runtime.CompilerServices.DateTimeConstantAttribute to the parameter information with the default value stored as an Int64 (the number of ticks). C# actually sees the optional value in the above example and will use it. That is both VB and C# can call the code taking advantage of the optional value for the date parameter, but only VB let’s you define that value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1802239" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>Displaying Dates in VS 2010</title><link>http://msmvps.com/blogs/bill/archive/2011/11/08/displaying-dates-in-vs-2010.aspx</link><pubDate>Tue, 08 Nov 2011 05:30:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1802185</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1802185</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/11/08/displaying-dates-in-vs-2010.aspx#comments</comments><description>&lt;p&gt;From time to time there&amp;rsquo;s discussion about the way dates are displayed in the Visual Studio IDE for Visual Basic. Typically dates are shown using VB&amp;rsquo;s date literal syntax of #MM/dd/yyyy# which is the standard US format.&amp;nbsp; For people outside of the USA this can be confusing or ambiguous at times.&amp;nbsp; The good news is Visual Studio allows you to easily add your own display formatter.&lt;/p&gt;
&lt;p&gt;Simply create a new class library project, add the following attribute to your AssemblyInfo file:&lt;/p&gt;
&lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:Consolas;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;Assembly&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;: &lt;/span&gt;&lt;span&gt;&lt;span style="color:#000088;"&gt;DebuggerDisplay&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;span style="background-color:#fefff0;color:#a31515;"&gt;&amp;quot;Date: {ToString(&amp;quot;&amp;quot;s&amp;quot;&amp;quot;)}&amp;nbsp;&amp;nbsp; kind={Kind}&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, Target:=&lt;/span&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;GetType&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span&gt;&lt;span style="color:#000088;"&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;))&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And then just copy the assembly to your Visualizers directory, eg: &lt;br /&gt;&amp;nbsp; My Documents\Visual Studio 2010\Visualizers&lt;/p&gt;
&lt;p&gt;I added the Kind property to the display so as you can easily see if the Date is a local date, UTC or unspecified.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached a sample project.&amp;nbsp; Enjoy &lt;img src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/3000.wlEmoticon_2D00_smile_5F00_4E15BC0E.png" alt="Smile" class="wlEmoticon wlEmoticon-smile" style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1802185" width="1" height="1"&gt;</description><enclosure url="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.01.80.21.85/ISODateDisplay.zip" length="5892" type="application/x-zip-compressed" /><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Design/default.aspx">Design</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item><item><title>VB Quark #6: Date operators</title><link>http://msmvps.com/blogs/bill/archive/2011/10/26/vb-quark-6-date-operators.aspx</link><pubDate>Wed, 26 Oct 2011 06:28:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1801661</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1801661</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/10/26/vb-quark-6-date-operators.aspx#comments</comments><description>&lt;p&gt;The DateTime structure in .NET includes custom operators for Date comparisons such as less than, greater than, equal and not equal; but did you know it also includes addition and subtraction operators ?&amp;#160; There’s two subtraction operators and one addition operator defined inside DateTime:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;date = date – timespan&lt;/li&gt;    &lt;li&gt;timespan = date – date&lt;/li&gt;    &lt;li&gt;date = date + timespan&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Those three cases should all seem relatively obvious, such as adding or subtracting an hour from a date, or calculating how many minutes between two dates etc...&lt;/p&gt;  &lt;p&gt;BUT, did you know VB also defines another case where you can add two dates, eg:&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim result = Date1 + Date2&lt;/p&gt;  &lt;p&gt;Now if you guessed that the type of result is String, then congratulations !! Note: this operator resolution is only valid with Option Strict Off&lt;/p&gt;  &lt;p&gt;Obviously adding two dates can’t give a valid date or timespan, so the only real options are to return a string concatenation of the date or throw an error. There are a couple of fringe cases where, depending on your system locale, the resultant string can indeed be parsed back into a date, eg:&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; dt1 = #1:00:00 PM#         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt; dt2 = Now.Date         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; dtResult &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Date&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = dt1 + dt2&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;p&gt;But that really is a fringe case, and would depend on the system locale formatting. &lt;/p&gt;  &lt;p&gt;I think it’s probably fair to say this case is a quirk of a quark, probably introduced as partial legacy. I honestly can’t see any usefulness of the addition operator between two dates that returns a string. If the intent was some legacy support, it might have made sense to return a date if one of the dates was date zero with time information, but the concatenation of the date strings doesn’t seem to reliably serve any purpose.&lt;/p&gt;  &lt;p&gt;The good news is you can only do the string = date + date operation with Option Strict Off. Guess that’s just another reason to turn Option Strict On&amp;#160; &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/5383.wlEmoticon_2D00_winkingsmile_5F00_31ADE790.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1801661" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Quark #5: C is for Char</title><link>http://msmvps.com/blogs/bill/archive/2011/09/29/vb-quark-5-c-is-for-char.aspx</link><pubDate>Thu, 29 Sep 2011 05:50:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1800383</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1800383</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/09/29/vb-quark-5-c-is-for-char.aspx#comments</comments><description>&lt;p&gt;Can you pick the problem with this code ? :&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; currentChar &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; i = 0 &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; largenumber         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentChar = getChar(i)          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; currentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;a&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; count += 1         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The answer of course is the literal “a” is of type string, not of type Char. Hence currentChar gets implicitly widened to a String to make the expression a string comparison expression. This means a new string is created with the contents of currentChar on each iteration, and the comparison is a string comparison which checks for null strings and empty strings and then does a compare ordinal etc. This is incredibly inefficient.&lt;/p&gt;  &lt;p&gt;If “a” was typed as Char, then the comparison is a simple low level IL compare of the underlying values (int16’s).&lt;/p&gt;  &lt;p&gt;You can use CChar, as in CChar(“a”), but it’s a lot easier just to add the type literal suffix c, eg “a”c&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; currentChar &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; i = 0 &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; largenumber         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; currentChar = getChar(i)          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; currentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;a&amp;quot;&lt;strong&gt;c&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; count += 1         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;The change in this code is about 20 fold performance improvement (run as release build outside of Visual Studio). &lt;strong&gt;That’s a 20 fold increase just by typing one extra letter !!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This example was based on &lt;a href="http://msmvps.com/blogs/bill/archive/2011/03/10/memory-mapped-files-and-pointers-or-not.aspx" target="_blank"&gt;real sample code where a massive file was being parsed char by char&lt;/a&gt;.&amp;#160; There too, attention to the fine detail showed a massive performance improvement over the original code. It’s often the little things that can make a huge difference.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This VB quark was brought to you by the type literal “c”&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1800383" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Quark #4: type literals</title><link>http://msmvps.com/blogs/bill/archive/2011/09/26/vb-quark-4.aspx</link><pubDate>Mon, 26 Sep 2011 05:54:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1800185</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1800185</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/09/26/vb-quark-4.aspx#comments</comments><description>&lt;p&gt;Do you know why you can’t write this code in VB:&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;#160;&amp;#160; Dim&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;font-size:10pt;"&gt;x = 123456789.0123456789&lt;/span&gt; &lt;/span&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Answer: The IDE won’t let you &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/7776.wlEmoticon_2D00_winkingsmile_5F00_7076927B.png" /&gt; &lt;/p&gt;  &lt;p&gt;If you try to write that code the IDE will truncate the number, giving :&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;#160;&amp;#160; Dim&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;font-size:10pt;"&gt;x = 123456789.01234567&lt;/span&gt; &lt;/span&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;To include all the decimal places you need to be using the Decimal type. To do this you indicate the constant is of type decimal by adding the suffix D on the end, eg:&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;span style="color:#000000;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;Dim&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;font-size:10pt;"&gt;x = 123456789.0123456789&lt;strong&gt;D&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;The reason for this is VB treats numeric literals as of type Double by default if they have a decimal place. If there is no decimal place in the literal then the value is consider to be an Integer (Int32), or if it is too large for an Integer, it’s considered to be a Long (Int64).&lt;/p&gt;  &lt;p&gt;If you want the literal as a type other than Double, Integer or Long you need to either convert using CType, CShort, CSng etc, or add a type literal suffix. The following is the complete list for numeric type literal suffixes in VB:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;Suffix&lt;/strong&gt; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;Type&lt;/strong&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;F&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Single &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;R&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Double&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;D&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Decimal&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;S&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Int16, Short&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;I&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Int32, Integer&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;L&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Int64, Long&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;US&lt;/td&gt;        &lt;td valign="top" width="200"&gt;UInt16, UShort&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;UI&lt;/td&gt;        &lt;td valign="top" width="200"&gt;UInt32, UInteger&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;UL&lt;/td&gt;        &lt;td valign="top" width="200"&gt;UInt64, ULong&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;In case you’re wondering, the “F” for Single is short for &amp;quot;Float”, and the “R” for Double is short for “Real Number”.&lt;/p&gt;  &lt;p&gt;Here’s another example of where you should use type literal suffixes. Consider this code :&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;Dim&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;i1, i2 &lt;/span&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;As&lt;/span&gt;&amp;#160;&lt;/span&gt;&lt;span&gt;&lt;span style="color:#000088;"&gt;Int16&lt;/span&gt; &lt;/span&gt;          &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:consolas;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;span style="color:#000000;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i1 = &amp;amp;HF0            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i2 = i1 &lt;/span&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;And&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;amp;HFF&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;If you have Option Strict On, the last line will cause a compile time error saying that an implicit conversion from Integer to Short is not allowed. So what is happening here, and why doesn’t the middle line cause the same problem ?&lt;/p&gt;  &lt;p&gt;Well the line i1 = &amp;amp;HF0 compiles fine because the constant &amp;amp;HF0 can be evaluated at compile time, so there’s no problem there. The last line however cannot be evaluated because the variable i1 is not a constant. Try it for yourself if you like: change the declaration of i1 to a Const, and you’ll see the last line&amp;#160; compiles fine with Strict On.&lt;/p&gt;  &lt;p&gt;Because VB can’t evaluate the variable expression at compile time, it uses the default type for numeric constants : Integer (aka Int32). And because a short can be implicitly widened to Int32, the expression on the right hand side becomes an Int32: hence the error.&lt;/p&gt;  &lt;p&gt;In Visual Studio the error correction wizard will suggest converting the entire&amp;#160; expression to an Int16, as such :&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i2 = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;CShort&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(i1 &lt;/span&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;And&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;amp;HFF)&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;But that’s a runtime conversion that isn’t needed if you declare the &amp;amp;HFF constant with the correct type literal suffix S:&lt;/p&gt;  &lt;p&gt;&lt;span style="line-height:normal;"&gt;&lt;span style="font-family:consolas;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:10pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i2 = i1 &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;"&gt;&lt;span&gt;&lt;span style="color:#3092b1;"&gt;And&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;&amp;amp;HFFS&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;      &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;As you can see, the code correction wizard in Visual Studio doesn’t always provide the best syntax to use, so it really is up to you to know the correct literals to use and apply them.&amp;#160; &lt;/p&gt;  &lt;p&gt;Oh, you may have also noticed there is no type literal suffix for Byte and SByte. I’ll leave that for yet another quark &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/2438.wlEmoticon_2D00_smile_5F00_7F111893.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1800185" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Quark #3: operator differences in VB/C#</title><link>http://msmvps.com/blogs/bill/archive/2011/09/25/vb-quark-3.aspx</link><pubDate>Sun, 25 Sep 2011 10:20:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1800148</guid><dc:creator>bill</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1800148</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/09/25/vb-quark-3.aspx#comments</comments><description>&lt;p&gt;Can you spot the problem with this code:&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#000088"&gt;Extension&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;()&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; ToColor(argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;UInteger&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Color&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Return&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Color&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.FromArgb( _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &amp;amp; &amp;amp;HFF000000) &amp;gt;&amp;gt; &amp;amp;H18, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &amp;amp; &amp;amp;HFF0000) &amp;gt;&amp;gt; &amp;amp;H10, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &amp;amp; &amp;amp;HFF00) &amp;gt;&amp;gt; 8, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(argb &amp;amp; &amp;amp;HFF, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;))         &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you said it should be the bitwise And operator not the string concatenation operator give yourself a pat on the back.&amp;#160; The problem here is three fold:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The code is a failed attempt at translating from C#, and &lt;/li&gt;    &lt;li&gt;The project must have Option Strict Off for this code to even compile. &lt;/li&gt;    &lt;li&gt;No testing or unit tests to check if the code&amp;#160; works at runtime. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Sadly this is all too common. The above is in fact a very real example taken from the &lt;a href="http://silverlight.codeplex.com/SourceControl/changeset/view/69327#1516743" target="_blank"&gt;Silverlight Toolkit samples on Codeplex&lt;/a&gt; .&lt;/p&gt;  &lt;p&gt;So the steps to correct this are first be aware of the language equivalents when translating from C# to VB. See the &lt;a href="http://msdn.microsoft.com/en-us/library/czz35az4(v=VS.100).aspx" target="_blank"&gt;MSDN documentation on language equivalents&lt;/a&gt; for a great starting point. And take note of the operator equivalents. Some of the most common operators where people seem to make mistakes are:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="254"&gt;&lt;strong&gt;operator&lt;/strong&gt; &lt;/td&gt;        &lt;td valign="top" width="74"&gt;&lt;strong&gt;VB&lt;/strong&gt; &lt;/td&gt;        &lt;td valign="top" width="71"&gt;&lt;strong&gt;C#&lt;/strong&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;bitwise And&lt;/td&gt;        &lt;td valign="top" width="74"&gt;And&lt;/td&gt;        &lt;td valign="top" width="71"&gt;&amp;amp;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;bitwise Or&lt;/td&gt;        &lt;td valign="top" width="74"&gt;Or&lt;/td&gt;        &lt;td valign="top" width="71"&gt;|&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;bitwise exclusive Or&lt;/td&gt;        &lt;td valign="top" width="74"&gt;XOr&lt;/td&gt;        &lt;td valign="top" width="71"&gt;^&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;Short circuited Boolean And&lt;/td&gt;        &lt;td valign="top" width="74"&gt;AndAlso&lt;/td&gt;        &lt;td valign="top" width="71"&gt;&amp;amp;&amp;amp;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;Short circuited Boolean Or&lt;/td&gt;        &lt;td valign="top" width="74"&gt;OrElse&lt;/td&gt;        &lt;td valign="top" width="71"&gt;||&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;equality&lt;/td&gt;        &lt;td valign="top" width="74"&gt;=&lt;/td&gt;        &lt;td valign="top" width="71"&gt;==&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;assignment&lt;/td&gt;        &lt;td valign="top" width="74"&gt;=&lt;/td&gt;        &lt;td valign="top" width="71"&gt;=&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;not equal&lt;/td&gt;        &lt;td valign="top" width="74"&gt;&amp;lt;&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="71"&gt;!=&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;exponent&lt;/td&gt;        &lt;td valign="top" width="74"&gt;^&lt;/td&gt;        &lt;td valign="top" width="71"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;modulus&lt;/td&gt;        &lt;td valign="top" width="74"&gt;Mod&lt;/td&gt;        &lt;td valign="top" width="71"&gt;%&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="254"&gt;string concatenation&lt;/td&gt;        &lt;td valign="top" width="74"&gt;&amp;amp;&lt;/td&gt;        &lt;td valign="top" width="71"&gt;+&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;From the short list above you can see the ^ and &amp;amp; operators have very different meanings in VB compared to C#. Which leads us to items 2 &amp;amp; 3.&lt;/p&gt;  &lt;p&gt;If you are unsure of VB, or are translating and hence have a lot of code that *may* be invalid you can improve catching of these kind of developer mistakes by turning Option Strict On. In the original example, the argb &amp;amp; &amp;amp;HFF000000 would have given the result of a string: argb.ToString followed by –16777216. At runtime this string would then try to be converted to a number and then shifted right, most likely failing.&lt;/p&gt;  &lt;p&gt;So if you turn Option Strict On, you’d immediately get warnings on trying to convert the string to a long. But even once you’ve got it compiling with Strict On, you should test the code. A lot of code you can quickly query in the immediate window, or write unit tests.&lt;/p&gt;  &lt;p&gt;Oh, and the corrected code in this particular case is:&lt;/p&gt; &lt;font style="line-height:normal;"&gt;   &lt;br /&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#000088"&gt;Extension&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;()&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; ToColor(argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;UInteger&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Color&lt;/font&gt;&lt;/span&gt;        &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Return&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Color&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.FromArgb( _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;And&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp;HFF000000) &amp;gt;&amp;gt; 24, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;And&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp;HFF0000) &amp;gt;&amp;gt; 16, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;((argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;And&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp;HFF00) &amp;gt;&amp;gt; 8, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;), _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CType&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(argb &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;And&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp;HFF, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;))         &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For a complete project that fixes the VB samples for the Silverlight Toolkit, see &lt;a href="http://msmvps.com/blogs/bill/archive/2011/08/19/vb-windows-phone-toolkit-aug-11-sample.aspx" target="_blank"&gt;my blog post from last month&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1800148" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Bug/default.aspx">Bug</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Quark #2: compiler directives and constants</title><link>http://msmvps.com/blogs/bill/archive/2011/09/24/vb-quark-2.aspx</link><pubDate>Sat, 24 Sep 2011 04:31:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1800110</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1800110</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/09/24/vb-quark-2.aspx#comments</comments><description>&lt;p&gt;Building upon &lt;a href="http://msmvps.com/blogs/bill/archive/2011/09/24/vb-quark-1.aspx" target="_blank"&gt;VB Quark #1&lt;/a&gt; , did you know you can use compiler directives alongside expressions in constants ?&lt;/p&gt;  &lt;p&gt;&lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;&lt;font style="font-size:10pt;"&gt;#If&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt; CONFIG = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;Debug&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;          &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160; Const path As String = &amp;quot;Z:\mydebug.sdf&amp;quot;&lt;/font&gt;          &lt;br /&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;#Else&lt;/font&gt;&lt;/span&gt;          &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; path &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;String&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;|DataDirectory|\Database1.sdf&amp;quot;&lt;/font&gt;&lt;/span&gt;          &lt;br /&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;#End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;          &lt;br /&gt;          &lt;br /&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; connectionString = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;Data Source=&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &amp;amp; path&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000" size="2" face="Consolas"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The nice thing about this is as you change the config from Debug to Release, Visual Studio will grey out the parts that aren’t in the current compilation. In the above example, when I do a debug build I’m using my database in Z:\mydebug.sdf, but when I do a release build it automatically uses the database Database1.sdf in the application’s DataDirectory.&lt;/p&gt;  &lt;p&gt;You can use compiler directives pretty much anywhere in your code to replace any code block with another at compile time based on the directives. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1800110" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Quark #1: constant expressions</title><link>http://msmvps.com/blogs/bill/archive/2011/09/24/vb-quark-1.aspx</link><pubDate>Sat, 24 Sep 2011 03:56:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1800108</guid><dc:creator>bill</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1800108</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/09/24/vb-quark-1.aspx#comments</comments><description>&lt;p&gt;This quark is more of a did ya know quark about constant expressions in VB. You probably know you can declare a constant expression such :&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; appName &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;String&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = &lt;/font&gt;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;font-size:10pt;" color="#a31515"&gt;&amp;quot;My Really Cool App&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;p&gt;But did you know you can also do operations in constants ?&lt;/p&gt;  &lt;p&gt;Rather than calculate the area of a circle you can write: &lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt; radius = 4.2         &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; area = &lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Math&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.PI * radius ^ 2&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p&gt;The compiler will calculate the area constant at compile time. This makes it easy to change the area constant by simply changing the radius.&lt;/p&gt;  &lt;p&gt;The operations you can do include all the standard mathematical operations : +, –, /, \, * , ^ and Mod as well as bitwise operations such as And and Or as well as bit shifting &amp;lt;&amp;lt; and &amp;gt;&amp;gt;.&lt;/p&gt;  &lt;p&gt;For example you can declare an enum for bits using shift operations: (note: Enums are constants)&lt;/p&gt;  &lt;p&gt;&lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Enum&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;bits&lt;/font&gt;&lt;/span&gt;          &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:10pt;"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bit0 = 1           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bit1 = 1 &amp;lt;&amp;lt; 1            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bit2 = 1 &amp;lt;&amp;lt; 2            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bit3 = bit2 &amp;lt;&amp;lt; 1            &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:10pt;" color="#3092b1"&gt;Enum&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can also use the If operator. For example you might want to limit a constant based on another constant, eg if gravity is greater than 20g’s then you might want to limit it to 20g for calculations.&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; workingG = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(g &amp;lt; 20 * 9.8, g, 20 * 9.8)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;p&gt;And you can also do conversions between the intrinsic numeric types, eg CDbl, CSng, CDec, CLng, CInt, CShort, CByte, CULng,&amp;#160; CUInt, CUShort, CSByte. And conversions to and from boolean to the numeric types: CBool and the aforementioned conversion operators.&lt;/p&gt; &lt;font style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:10pt;"&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:10pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; roughArea &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Int32&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;CInt&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(area)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;    &lt;br /&gt;&lt;/font&gt;  &lt;p&gt;For dates, there aren’t any operations or conversions you can do: you have to define them using the literal representation in US format, eg today 24/9/2011 is defined as #9/24/2011# . This is still a lot better than certain other languages (not picking on C#) that don’t support constant date literals.&lt;/p&gt;  &lt;p&gt;For strings, you can’t do any conversions but can use the concatenation operator &amp;amp;. You can use + instead of &amp;amp;, but I don’t recommend that (more on that in another quark). Strings that are compiled as constants are also typically interned.&lt;/p&gt;  &lt;p&gt;Anywhere you use an expression that can be compiled as a constant, it is evaluated at compile time: you don’t have to declare a constant variable to reap the benefits of compile time evaluation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1800108" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB+Quarks/default.aspx">VB Quarks</category></item><item><title>VB Windows Phone Toolkit Aug 11 sample</title><link>http://msmvps.com/blogs/bill/archive/2011/08/19/vb-windows-phone-toolkit-aug-11-sample.aspx</link><pubDate>Fri, 19 Aug 2011 12:57:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1797890</guid><dc:creator>bill</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1797890</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/08/19/vb-windows-phone-toolkit-aug-11-sample.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="http://silverlight.codeplex.com/releases/view/71550" target="_blank"&gt;Silverlight Windows Phone Toolkit August 2011 (7.1 SDK)&lt;/a&gt; doesn&amp;#39;t contain a working VB sample.&amp;#160; If you try to load the VB sample that does ship, you’ll get hundreds of errors.&amp;#160; So I put together the VB sample that should have shipped.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://skydrive.live.com/?cid=73b8e1011c9738b5&amp;amp;sc=documents&amp;amp;id=73B8E1011C9738B5%21169#" target="_blank"&gt;Download the VB Windows Phone Toolkit samples&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/4370.wlEmoticon_2D00_smile_5F00_2FC4FCFE.png" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Oh, and Thanks to &lt;a href="http://nicksnettravels.builttoroam.com/" target="_blank"&gt;Nick Randolph&lt;/a&gt; for confirming the SDK doesn’t contain a &lt;em&gt;working&lt;/em&gt; example. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1797890" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category></item><item><title>Remember variant ?</title><link>http://msmvps.com/blogs/bill/archive/2011/07/28/remember-variant.aspx</link><pubDate>Thu, 28 Jul 2011 03:40:39 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1796831</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1796831</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/07/28/remember-variant.aspx#comments</comments><description>&lt;p&gt;Cory is continuing &lt;a href="http://addressof.com/blog/archive/2011/05/29/VB10-vs-VB6-_2800_aka-VB.FRED_2900_.aspx" target="_blank"&gt;his posts about VB10 differences from VB6&lt;/a&gt;. His latest posts is on &lt;a href="http://addressof.com/blog/archive/2011/07/27/VB10-vs-VB6_3A00_-Variants-are-not-supported_2E00_.aspx" target="_blank"&gt;variants&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Variants were/are basically a structure that contains a variant type enumeration and either the variable’s data value or a pointer to the variable data. In pseudo code it basically looks like:&lt;/p&gt;  &lt;p&gt;Structure Variant   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public VT as VariantType    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public Value As Object    &lt;br /&gt;End Structure&lt;/p&gt;  &lt;p&gt;The Value field would hold the actual data in the case of simple value types, or a&amp;#160; pointer to the object such as in the case of arrays. In the .NET world there are actually variant structures but not as part of the .Net framework: you can find one for example in the Microsoft.VisualStudio.Package namespace.&lt;/p&gt;  &lt;p&gt;The reason you won’t find it in the framework is because the variant structure is not only limited but also superfluous in .NET due to the type system. Take for example the case of a value as a Double versus an Integer. In VB6 you would use Variant to allow you to pass both values to a method. The Value field would hold the actual data so it was important that the VT field told you the value type. The problem with this approach is the VT field is an enumeration, so doesn’t allow for custom value types to have their actual type discoverable: try passing a UDT into a variant and then determining which type of UDT is is in VB6 to see what I mean &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/7610.wlEmoticon_2D00_winkingsmile_5F00_7A0C27DC.png" /&gt;&lt;/p&gt;  &lt;p&gt;In .NET the object based type system means you can always determine the type of a variable. So the “everything stems from Object” approach in .NET is definitely more versatile.&lt;/p&gt;  &lt;p&gt;There was however one thing missing: yep, IsMissing was missing. Variants allow optional parameters to indicate if a value was missing. The first release of .Net didn’t have anything in place to indicate if an optional parameter was missing. It wasn’t until nullable types were added that you could do the equivalent of IsMissing by testing for Is Nothing. The Is Nothing approach is more holistic and uniform (as opposed to IsEmpty versus IsMissing et al) and works across the board for nullable types and As Object variables and parameters.&lt;/p&gt;  &lt;p&gt;So, in summary, there was initially some gains and some losses with the move from Variant to an Object based system, but as the .NET framework and language implementations have matured, the Object based system (.NET) offers far more functionality and flexibility.&lt;/p&gt;  &lt;p&gt;Oh, as you can probably see, the above explanation/description actually touches on a number of items in &lt;a href="http://addressof.com/blog/archive/2011/05/29/VB10-vs-VB6-_2800_aka-VB.FRED_2900_.aspx" target="_blank"&gt;the list&lt;/a&gt; Cory referred to: in particular but not limited to items 11 and 27. I think it is always important to come up for air and see the big picture: the forest from the trees. The overall benefits of moving to Object based in .NET extend far beyond these one or two items.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1796831" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item><item><title>Windows Phone 7 : 6 months later</title><link>http://msmvps.com/blogs/bill/archive/2011/06/17/windows-phone-7-6-months-later.aspx</link><pubDate>Fri, 17 Jun 2011 07:29:55 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1794861</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1794861</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/06/17/windows-phone-7-6-months-later.aspx#comments</comments><description>&lt;p&gt;I’ve had my HTC Mozart for about 6 months now, so I thought I’d give an update of my thoughts about it and Windows Phone 7.&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://www.microsoft.com/windowsphone/en-us/features/update-schedule-world.aspx" target="_blank"&gt;first set of WP7 updates&lt;/a&gt; were really slow to roll-out here in Australia to Telstra: Telstra was the 2nd last mobile operator to deliver the update in the world. Given that the Spain’s Telefonica apparently still is only scheduling updates, for now Telstra has the honour of actually being last to deliver the updates (to date). Despite those middle party delays, the 7.1 update was awesome !&amp;#160; Performance improvements are huge with some applications, and most importantly we got cut and paste back.&lt;/p&gt;  &lt;p&gt;For more feature improvements we still have to wait until later this year when the “Mango” update will be released. Developers &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=11321" target="_blank"&gt;can play with the mango bits&lt;/a&gt; in Visual Studio and the phone emulator. So far Mango looks really cool and addresses many of my initial/early concerns about Windows Phone.&amp;#160; Looking at my “xmas wish list” of 3 items, that list seems at least half way addressed :&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Sensors&lt;/strong&gt;: Yes, in Mango the platform exposes more of the phone’s sensors.&amp;#160; &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/4442.wlEmoticon_2D00_smile_5F00_495A559C.png" /&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Content Providers&lt;/strong&gt;: Again it seems like Microsoft has heard and is exposing ways for applications to work with the contacts list etc.&amp;#160; At the same time they are also introducing “groups” for contacts which may in itself address many of the reasons I want/need to have the contacts list exposed. hopefully groups too will be exposed to programmatic access (with permissions). There still doesn’t appear to be any shared storage/data access on the phone.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Let me work with my PC&lt;/strong&gt; : Sadly, I haven’t heard any news on this front; everything I have heard has been focused on a better “cloud” experience. It’s a pity as there are times when there is no internet access, and it would be handy to transfer files &amp;amp; contacts to the phone. Zune really needs to open up to include basic file management; and ideally outlook synchronisation. This is a MUST have given the lack of Zune music in Australia. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So that was my old list. Today some of the things I’d like to see Mango address are (in no particular order):&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Capacitive button settings:        &lt;br /&gt;&lt;/strong&gt;Way too often I find I accidentally hit the home, search or back buttons, especially when passing the phone to other people to show them something on the phone. It’s be nice if there was a settings page where you could modify the sensitivity of these buttons. Ideally I’d like to be able to set them to only work on double click/touch. It’s a little thing, but it would drastically change the way I feel about the phone’s physical form factor. It’d make it feel like the phone was truly mine, rather than the phone constantly dictating to me not to touch it there, and not to hold it that way &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/6136.wlEmoticon_2D00_winkingsmile_5F00_5FCCF423.png" /&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;iCal and/or vCal support:        &lt;br /&gt;&lt;/strong&gt;A month or two ago I got an email from some of the crew at Microsoft to attend a Live Meeting about Windows Phone.&amp;#160; “Cool !!” I thought. The problem was I read that email on my phone, and couldn’t save the attached calendar appointment !&amp;#160; Oh the irony !!!!       &lt;br /&gt;Must be able to send and receive calendar appointments via email.       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;vCard support:        &lt;br /&gt;&lt;/strong&gt;There needs to be a way to simply share contact details with people. VCard support in email and especially SMS is a must have.       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Better document handling:        &lt;br /&gt;&lt;/strong&gt;The ability to:       &lt;br /&gt;+ simply save a document from an email,       &lt;br /&gt;+ transfer files directly to/from a PC       &lt;br /&gt;+ programmatically generate and save documents (e.g. invoices/quotes etc.) in shared locations. Ditto for data access.       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Zune music:        &lt;br /&gt;&lt;/strong&gt;If Microsoft wants people in Australia to take it seriously about its commitment to Windows Phone it needs to invest in actually having Zune Music available here (ditto for other countries). ITunes has no problem with providing music in Australia. Microsoft: either make Zune Music in Australia happen or open the phone up to 3rd party music sites and file organisation (iTunes on the Windows Phone !!) or both. It’s really crappy to lock the phone down and then not provide the service. Even worse when you open Zune and it constantly reminds you there is no service here. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;   &lt;br /&gt;Despite the list of “wants” or “shortcomings”, Windows Phone really is a nice device. The UI is generally enjoyable (as long as you don’t accidentally hit those capacitive buttons &amp;lt;g&amp;gt;).&amp;#160; &lt;a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2011/05/24/microsoft-officially-unveils-mango-hundreds-of-improvements-on-the-way.aspx" target="_blank"&gt;Mango looks even better&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Looking forward to hearing more details. Spaces to watch:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://windowsteamblog.com/windows_phone/b/windowsphone/" target="_blank"&gt;Windows Phone Blog&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/" target="_blank"&gt;Windows Phone Developer Blog&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1794861" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Rant/default.aspx">Rant</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WP7/default.aspx">WP7</category></item><item><title>Memory mapped files and pointers… or not ???</title><link>http://msmvps.com/blogs/bill/archive/2011/03/10/memory-mapped-files-and-pointers-or-not.aspx</link><pubDate>Thu, 10 Mar 2011 01:29:04 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1789584</guid><dc:creator>bill</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1789584</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/03/10/memory-mapped-files-and-pointers-or-not.aspx#comments</comments><description>&lt;p&gt;Last week I was in Seattle for the MVP summit. Whilst there I saw a brief presentation from Joe Kunk on Memory Mapped files in .NET 4. I suggested to Joe that perhaps pointers might give a performance boost. Then someone from Microsoft (&lt;em&gt;not to mention names&lt;/em&gt;) suggested if that were the case, it might be a good argument for the inclusion of pointers in a future version. I chatted to Joe afterwards and he suggested I download the code and give it a try, so I did. The following are my findings, and the journey along the way. The end result is a dramatic performance improvement:&lt;/p&gt;  &lt;h3&gt;&lt;font color="#004040"&gt;First steps : code review&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;I &lt;a href="http://visualstudiomagazine.com/articles/2010/11/01/using-memory-mapped-files-in-the-net-framework-4.aspx" target="_blank"&gt;downloaded Joe’s code&lt;/a&gt;&amp;#160; and created a 5GB sample data file. I figured 5 GB is big enough to push it into the 64 bit realm. I ran the code and it took about 25 minutes to create the index file. I had a quick look at the code and identified some areas to immediately tweak. Inside the main code block loop there were a number of conversions going on, some implied; all of which tend to slow code down. The original code was as follows:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;&amp;#160;&amp;#160; For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; i = 1 &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; accessor.Capacity          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; CurrentByte = accessor.ReadByte(ViewPosition) : ViewPosition += 1          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; CurrentChar = Chr(CurrentByte)          &lt;br /&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.IsLetterOrDigit(CurrentChar)) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;         &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; InWord = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;         &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Wordlength += 1          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; ((&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.IsUpper(CurrentChar) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;AndAlso&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; CurrentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;R&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;OrElse&lt;/font&gt;&lt;/span&gt;         &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.IsLower(CurrentChar) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;AndAlso&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; CurrentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;r&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;)) &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;         &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; HasR = &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;         &lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;There’s a number of issues to be aware of here. The code that compares a Char with a String causes overhead, causing the char to be converted to a string and then calling VB’s string comparison routines. Rather than write &lt;span&gt;&lt;font color="#3092b1"&gt;AndAlso&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; CurrentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;R&amp;quot;&lt;/font&gt;&lt;/span&gt; , it’s better to write &lt;span&gt;&lt;font color="#3092b1"&gt;AndAlso&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; CurrentChar = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;R&amp;quot;c&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;. This makes it a simple comparison of Char’s.&lt;/p&gt;  &lt;p&gt;The calls to IsUpper&amp;#160; and IsLower are completely redundant and are more expensive than the Char comparison calls. In fact, it’s questionable if Char is even needed here. Given this code is purely designed for ASCII, not Unicode, I rewrote the code to use Byte instead of Char for this initial part of the loop. Modifying the code only took a few minutes, the only bump being the need to create a replacement for the IsLetterOrDigit call. I’d argue IsLetterOrDigit might not be what is wanted in the first place, as it means words with hyphens, @ signs or apostrophes are excluded. Given St Pat’s day is next week, I certainly wouldn’t want to be excluding any of the O’Reily’s ;)&lt;/p&gt;  &lt;p&gt;Never the less, I kept the code pure to it’s original implementation. For IsLetterOrDigit, I made a simple True/False array. This was easy to make by writing out the values into the debug window, e.g:&lt;/p&gt;  &lt;pre style="line-height:normal;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; i = 0 &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; 255&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Debug&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Write(&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Char&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.IsLetterOrDigit(Chr(i)) &amp;amp; &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;, &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;p&gt;From the output in debug window the output from that, I created a lookup array via cut and paste:&lt;/p&gt;

&lt;p&gt;&amp;#160;&amp;#160; Private IsLetterOrDigit() As Boolean = {False, False, False, False, False, …………… 
  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;With those quick changes in place the test time dropped to around 18 to 19 minutes: a significant improvement, and well worth the time it took to make them, but nothing earth shattering.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;&lt;font color="#004040"&gt;Look for bottlenecks&lt;/font&gt;&lt;/h3&gt;

&lt;p&gt;On my desktop machine I have standard mechanical hard drives and newer Solid State Drives (SSD’s). The SSD’s are blistering fast, and make a huge gain in read times (and windows boot times). Putting the data file on a SSD gave a performance improvement of about another 5 minutes. (test was now 14.4 minutes).&amp;#160; Although again a significant improvement, it wasn’t the order of magnitude I would expect in what is basically a file IO bound operation. This alluded to the bottleneck being the code, not the hardware. So it was time to revisit the entire Memory Mapped file hypothesis. The first step was to write a standard benchmark using a standard FileStream.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p align="left"&gt;&lt;strong&gt;&lt;em&gt;&lt;font style="background-color:#cccccc;" size="3"&gt;My first runs came in at about 36 seconds !!&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I set the FileStream to read the data in blocks of &amp;amp;H10000 bytes at a time. It’s an arbitrary figure, but later testing shows it’s around the sweet spot for this particular machine. My first runs came in at about 36 seconds !! I was astounded. Some minor tweaks and the time was down to 32 seconds. I checked and verified the output. The locations were correct and I had the same number of matches as Joe did plus one. I’m guessing the extra one is a boundary case condition that my code picked up on. (&lt;em&gt;It’d probably be easy enough to test by looking at the last entries&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;Out of curiosity I put the data file back on the old mechanical drive. The time jumped massively from 30 seconds to about 90 seconds. This told me the bottle neck was now the hardware. Investment spent on the hardware rather than the software, such as SSD’s and even RAID SSD’s etc, are worth investigating at this point.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;As to pointers?&lt;/h3&gt;

&lt;p&gt;Well I never bothered writing the code to test the pointers and memory mapped file. The code I wrote was already 40 to 50 times faster than the memory mapped file implementation. With the file stream approach I estimate pointers to save about 10%, or 3 seconds on the fastest case scenario. If you look under the covers of the file stream you’ll see the buffer used internally uses pointers with win API call to ReadFile. With a bit of work you could write your own wrapper, call ReadFile yourself and skip the copying from the internal buffer to the buffer used in the search loop. Rather than go to that length, I simply tested what that extra copying was causing by copying into yet another buffer from inside the search loop: that added about 3 seconds to the code. It hardly seems worth the effort. Rather than spend time porting the code to use pointers it would be probably more worth the time to investigate making the code run async (I’ll leave that one for another day ;) )&lt;/p&gt;

&lt;p&gt;But that doesn’t mean there isn’t a case for pointers with memory mapped files. I used them many years ago (even from VB6). All I have shown is that for this case scenario, Memory Mapped files are not a good match. A compelling case scenario for pointers and memory mapped files remains to be shown. &lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;Memory mapped files are useful in many scenarios, such as shared data manipulation, and inter process communication. For raw data reads however, they are overhead with no realizable benefit.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Create benchmarks using similar techniques. And look under the covers to try to understand the differences and their significance. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Write well typed code and use Strict On semantics where ever possible. For example the quick code clean-up I did on the original code shaved off 5 minutes. Although that was only 20% improvement for the initial code, it was quick and easy to implement. On the final code, that 5 minutes is a massive overhead on top of 30 seconds (10 fold) !! So little bits of detail in your code can go a long long way to writing high performance code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre style="line-height:normal;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;&lt;font style="font-size:11.3pt;"&gt;#Region&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;" class="string"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;modifications by Bill McCarthy&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;CreateIndexEntryList&lt;/span&gt;(&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;ByVal&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;TextFilePath&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;String&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Of&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;IndexEntry&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;index&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Of&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;IndexEntry&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;)(&lt;span class="number"&gt;&amp;amp;HF0000&lt;/span&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;bufferSize&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;Int32&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; = &lt;span class="number"&gt;&amp;amp;H10000&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;offset&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;Int32&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;buffer&lt;/span&gt;(&lt;span class="number"&gt;0&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;bufferSize&lt;/span&gt; - &lt;span class="number"&gt;1&lt;/span&gt;) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Byte&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;filePosition&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Long&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;inWord&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;wordlength&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;Int32&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;hasR&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;sb&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;System&lt;/span&gt;.&lt;span class="identifier"&gt;Text&lt;/span&gt;.&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;StringBuilder&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;(&lt;span class="number"&gt;6&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Try&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Using&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;stream&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;IO&lt;/span&gt;.&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;FileStream&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;span class="identifier"&gt;TextFilePath&lt;/span&gt;, &lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;FileMode&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.&lt;span class="identifier"&gt;Open&lt;/span&gt;, &lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;FileAccess&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.&lt;span class="identifier"&gt;Read&lt;/span&gt;, &lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;FileShare&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;.&lt;span class="identifier"&gt;Read&lt;/span&gt;, &lt;span class="identifier"&gt;bufferSize&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;countRead&lt;/span&gt; = &lt;span class="identifier"&gt;stream&lt;/span&gt;.&lt;span class="identifier"&gt;Read&lt;/span&gt;(&lt;span class="identifier"&gt;buffer&lt;/span&gt;, &lt;span class="identifier"&gt;offset&lt;/span&gt;, &lt;span class="identifier"&gt;bufferSize&lt;/span&gt; - &lt;span class="identifier"&gt;offset&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;While&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;countRead&lt;/span&gt; &amp;gt; &lt;span class="number"&gt;0&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;upper&lt;/span&gt; = &lt;span class="identifier"&gt;countRead&lt;/span&gt; + &lt;span class="identifier"&gt;offset&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;i&lt;/span&gt; = &lt;span class="identifier"&gt;offset&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;upper&lt;/span&gt; - &lt;span class="number"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;currentByte&lt;/span&gt; = &lt;span class="identifier"&gt;buffer&lt;/span&gt;(&lt;span class="identifier"&gt;i&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;span class="identifier"&gt;IsLetterOrDigit&lt;/span&gt;(&lt;span class="identifier"&gt;currentByte&lt;/span&gt;)) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;inWord&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;wordlength&lt;/span&gt; += &lt;span class="number"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;span class="identifier"&gt;currentByte&lt;/span&gt; = &lt;span class="identifier"&gt;byteUpper_R&lt;/span&gt;) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;OrElse&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;span class="identifier"&gt;currentByte&lt;/span&gt; = &lt;span class="identifier"&gt;byteLower_r&lt;/span&gt;) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;hasR&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Else&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;span class="identifier"&gt;wordlength&lt;/span&gt; = &lt;span class="number"&gt;5&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;And&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;hasR&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;bufferPosition&lt;/span&gt; = &lt;span class="identifier"&gt;i&lt;/span&gt; - &lt;span class="number"&gt;5&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;sb&lt;/span&gt;.&lt;span class="identifier"&gt;Clear&lt;/span&gt;()&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;j&lt;/span&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="number"&gt;4&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;sb&lt;/span&gt;.&lt;span class="identifier"&gt;Append&lt;/span&gt;(&lt;span class="identifier"&gt;Chr&lt;/span&gt;(&lt;span class="identifier"&gt;buffer&lt;/span&gt;(&lt;span class="identifier"&gt;bufferPosition&lt;/span&gt; + &lt;span class="identifier"&gt;j&lt;/span&gt;)))&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;index&lt;/span&gt;.&lt;span class="identifier"&gt;Add&lt;/span&gt;(&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;IndexEntry&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;(&lt;span class="identifier"&gt;sb&lt;/span&gt;.&lt;span class="identifier"&gt;ToString&lt;/span&gt;, &lt;span class="identifier"&gt;filePosition&lt;/span&gt; + &lt;span class="identifier"&gt;bufferPosition&lt;/span&gt; - &lt;span class="identifier"&gt;offset&lt;/span&gt;))&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;inWord&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;wordlength&lt;/span&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;hasR&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;offset&lt;/span&gt; = &lt;span class="identifier"&gt;wordlength&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;offset&lt;/span&gt; &amp;gt; &lt;span class="number"&gt;0&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Then&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;For&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;i&lt;/span&gt; = &lt;span class="number"&gt;0&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;To&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;offset&lt;/span&gt; - &lt;span class="number"&gt;1&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;buffer&lt;/span&gt;(&lt;span class="identifier"&gt;i&lt;/span&gt;) = &lt;span class="identifier"&gt;buffer&lt;/span&gt;(&lt;span class="identifier"&gt;upper&lt;/span&gt; + &lt;span class="identifier"&gt;i&lt;/span&gt; - &lt;span class="identifier"&gt;offset&lt;/span&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Next&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;If&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;filePosition&lt;/span&gt; += &lt;span class="identifier"&gt;countRead&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span class="identifier"&gt;countRead&lt;/span&gt; = &lt;span class="identifier"&gt;stream&lt;/span&gt;.&lt;span class="identifier"&gt;Read&lt;/span&gt;(&lt;span class="identifier"&gt;buffer&lt;/span&gt;, &lt;span class="identifier"&gt;offset&lt;/span&gt;, &lt;span class="identifier"&gt;bufferSize&lt;/span&gt; - &lt;span class="identifier"&gt;offset&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;While&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Using&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Catch&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;ex&lt;/span&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;Exception&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;message&lt;/span&gt; = &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;" class="string"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;IndexingLargeFiles.Index.CrearteIndexEntryList: &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; + &lt;span class="identifier"&gt;ex&lt;/span&gt;.&lt;span class="identifier"&gt;Message&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Throw&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="VB USER TYPES - IDENTIFIER - (TRANSIENT)"&gt;&lt;font color="#000088"&gt;Exception&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;(&lt;span class="identifier"&gt;message&lt;/span&gt;, &lt;span class="identifier"&gt;ex&lt;/span&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Try&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;index&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Function&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;byteUpper_R&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;CByte&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;span class="identifier"&gt;Asc&lt;/span&gt;(&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;" class="string"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;R&amp;quot;c&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;font color="#000000"&gt;))&lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;Const&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;span class="identifier"&gt;byteLower_r&lt;/span&gt; = &lt;/font&gt;&lt;span class="keyword"&gt;&lt;font color="#3092b1"&gt;CByte&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;span class="identifier"&gt;Asc&lt;/span&gt;(&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;" class="string"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;r&amp;quot;c&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;))&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;font style="font-size:11.3pt;"&gt;
  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; IsLetterOrDigit()&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Boolean&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; = {&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
  &lt;font style="font-size:11.3pt;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, 
        &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;False&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;,
        &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;True&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;font color="#000000"&gt;} &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;

&lt;p&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:11.3pt;"&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;#End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:11.3pt;" color="#3092b1"&gt;Region&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1789584" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VSM/default.aspx">VSM</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item><item><title>WP7 copy and paste is here !</title><link>http://msmvps.com/blogs/bill/archive/2011/02/05/wp7-copy-and-paste-is-here.aspx</link><pubDate>Sat, 05 Feb 2011 07:49:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1787671</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1787671</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2011/02/05/wp7-copy-and-paste-is-here.aspx#comments</comments><description>&lt;p&gt;In the emulator in the tools SDK that is &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/3480.wlEmoticon_2D00_winkingsmile_5F00_7CAD3E70.png" /&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Still waiting on the actual phone update, but for developers the tools update is now available from:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49b9d0c5-6597-4313-912a-f0cca9c7d277&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49b9d0c5-6597-4313-912a-f0cca9c7d277&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49b9d0c5-6597-4313-912a-f0cca9c7d277&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1787671" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WP7/default.aspx">WP7</category></item><item><title>Windows Phone Virtual Keyboards</title><link>http://msmvps.com/blogs/bill/archive/2010/11/17/windows-phone-virtual-keyboards.aspx</link><pubDate>Wed, 17 Nov 2010 00:44:28 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1782452</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1782452</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/17/windows-phone-virtual-keyboards.aspx#comments</comments><description>&lt;p&gt;Windows Phone 7 comes with about 57 different input scopes you can use (there’s actually 62 or so, but 5 of them give an exception when loaded).&amp;#160; The two most important scopes are Text and TelephoneNumber.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TelephoneNumber gives you the numeric keypad when the user goes to enter text.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Text gives you word suggestions and smiley faces like in messaging. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/6886.image_5F00_37A2C3A9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/6864.image_5F00_thumb_5F00_7332AC9C.png" width="179" height="244" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/7444.image_5F00_0860B245.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/8446.image_5F00_thumb_5F00_3214076B.png" width="194" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Setting these in code is a little convoluted. It’s a lot easier to simply set it in the XAML, eg:    &lt;br /&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#a31515"&gt;TextBox ... ..&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#ff0000"&gt; InputScope&lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;quot;Text&amp;quot;&lt;/span&gt;&lt;span&gt; &amp;gt;&amp;lt;/&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;TextBox&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:12pt;" color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;If you want to set the input scope in code, you need to construct an InputScope class instance, and add to it a InputScopeName class with the InputScopeName’s Value set to the InputScopeNameValue enum value.&amp;#160; It’s easiest to wrap this in an extension method:&lt;/p&gt;  &lt;pre style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Extension&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;()&amp;gt;&lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Sub&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; SetInputScope(&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;ByVal&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; textbox &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;TextBox&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;ByVal&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; value &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;InputScopeNameValue&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; scope &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;As&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;InputScope&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; scope.Names.Add(&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;New&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;InputScopeName&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;With&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; {.NameValue = value})&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; textbox.InputScope = scope&lt;br /&gt;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;End&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Sub&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;p&gt;Then setting the input scope in code simply becomes:&lt;/p&gt;

&lt;pre style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:12pt;"&gt;&amp;#160;&lt;font size="2"&gt;TextBox1.SetInputScope(&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;font color="#000088"&gt;InputScopeNameValue&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Text)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Some things to note about input scopes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;although you can cache an input scope, and assign it to a different textbox on an as needed basis, you have to be careful to ensure it is only assigned to one textbox at any given time. I doubt the memory minimization would be worth the effort. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;an InputScope can have multiple InputScopeName values, but it seems like only the first one in the list is used. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;the following InputScopeNameValue’s give a runtime error when run from the debugger:&amp;#160; PhraseList, RegularExpression&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;, Srgs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;, Xml&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;, EnumString&lt;/td&gt;&lt;/tr&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The main values you’ll want to use are: &lt;/p&gt;

&lt;table style="border-bottom:medium none;border-left:medium none;border-collapse:collapse;border-top:medium none;border-right:medium none;mso-border-alt:solid #7ba0cd 1.0pt;mso-border-themecolor:accent1;mso-border-themetint:191;mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;" class="MsoTableMediumGrid1Accent1" border="1" cellspacing="0" cellpadding="0" width="525"&gt;&lt;tbody&gt;
    &lt;tr style="mso-yfti-irow:-1;mso-yfti-firstrow:yes;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#bfbfbf;border-top:#7ba0cd 1pt solid;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:background1;mso-background-themeshade:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:5;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;value&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#bfbfbf;border-top:#7ba0cd 1pt solid;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:background1;mso-background-themeshade:191;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:1;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;description&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:0;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:68;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Default&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:64;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard QWERTY layout&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:1;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:4;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Text&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with features such as autocorrect and text suggestion&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:2;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:68;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Url&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:64;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with .com and customized Enter key for typing URLs.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:3;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:4;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;EmailSmtpAddress&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with .com and @ key.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:4;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:68;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;EmailNameOrAddress&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:64;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with .com and @ key, and easy access to phone number layout.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="height:29.7pt;mso-yfti-irow:5;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" height="39" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:4;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Maps&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" height="39" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with a customized Enter key. Used to type a location to search for on a map&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:6;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:68;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;TelephoneNumber&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:64;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;12-key layout&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:7;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:4;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Search&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Semi-transparent layout with a Search and .com key.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:8;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:68;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;NameOrPhoneNumber&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:64;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Standard layout with access to phone number layout. Used to type in the SMS &lt;b&gt;To&lt;/b&gt; field &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr style="mso-yfti-irow:9;mso-yfti-lastrow:yes;"&gt;
      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:#7ba0cd 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-border-themecolor:accent1;mso-border-themetint:191;mso-background-themecolor:accent1;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;mso-yfti-cnfc:4;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Chat&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td style="border-bottom:#7ba0cd 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;background:#dbe5f1;border-top:medium none;border-right:#7ba0cd 1pt solid;padding-top:0cm;mso-background-themecolor:accent1;mso-border-left-alt:solid #7ba0cd 1.0pt;mso-border-left-themecolor:accent1;mso-border-left-themetint:191;mso-border-top-alt:solid #7ba0cd 1.0pt;mso-border-top-themecolor:accent1;mso-border-top-themetint:191;mso-background-themetint:51;mso-border-bottom-themecolor:accent1;mso-border-bottom-themetint:191;mso-border-right-themecolor:accent1;mso-border-right-themetint:191;" valign="top"&gt;
        &lt;p style="line-height:normal;margin:9pt 0cm;" class="MsoNormal"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-fareast-language:en-au;"&gt;&lt;font face="Segoe UI"&gt;&lt;font style="font-size:8.5pt;" color="#000000"&gt;Text input that uses intelligent features such as abbreviations&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;abbreviated from &lt;a title="http://msdn.microsoft.com/en-us/library/39D7932C-3E67-4142-9CCB-68843A571A66(v=vs.95,d=lightweight).aspx" href="http://msdn.microsoft.com/en-us/library/39D7932C-3E67-4142-9CCB-68843A571A66(v=vs.95,d=lightweight).aspx"&gt;http://msdn.microsoft.com/en-us/library/39D7932C-3E67-4142-9CCB-68843A571A66(v=vs.95,d=lightweight).aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1782452" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category></item><item><title>My Windows Phone 7 Xmas wish list</title><link>http://msmvps.com/blogs/bill/archive/2010/11/17/my-windows-phone-7-xmas-wish-list.aspx</link><pubDate>Tue, 16 Nov 2010 23:03:59 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1782448</guid><dc:creator>bill</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1782448</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/17/my-windows-phone-7-xmas-wish-list.aspx#comments</comments><description>&lt;p&gt;As much as I like Windows Phone 7, there’s some really key areas that are missing. The following is my xmas wish list :&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1.&amp;#160; Give me my compass back.&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;When I bought my HTC Mozart, I did so with the understanding it had a gps and compass.&amp;#160; On the HTC web site it says :     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/6378.image_5F00_75997DDC.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/3644.image_5F00_thumb_5F00_1A4A9554.png" width="415" height="147" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;This illusion was even more exaggerated by so called navigation applications that actually show virtual compass dials: thing is they don’t work, and at best can only give you your course based on differential gps. When you’re on foot (especially in the Australian bush) that simply is not good enough.&lt;/p&gt;    &lt;p&gt;So Microsoft, please give me access to my compass. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;2. Provide Content Providers&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Those of you who work with certain other phones, probably know what I am talking about when I say &lt;a href="http://developer.android.com/guide/topics/providers/content-providers.html" target="_blank"&gt;ContentProvider&lt;/a&gt;’s. It’s the broad ability for applications to share data/”content”. It’s the key programmatical interface missing in Windows Phone 7. &lt;/p&gt;    &lt;p&gt;ContentProviders can allow access to the phone contacts list (with permissions); they can provide access to documents in the office hub; they can allow applications to choose whom they share data with; they can even provide a clipboard service.     &lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;3. Let me work with my PC&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;It really should be straight forward to connect the phone to my PC and put files on the phone. Today, unless you have exchange, the only way to work with documents is to email them to yourself. Skydrive, despite what some people may tell you, definitely DOES NOT synchronize office documents; it only synchronizes your OneNote. But even if they do fix skydrive, I shouldn’t be forced to copy documents over the web to get them from my PC to my phone and back.&lt;/p&gt;    &lt;p&gt;One of the key reasons I went with Windows Phone was the belief that they would have great synergy with the PC. At present they don’t. At present it doesn’t even work well with the cloud, only exchange.&amp;#160; (again, perhaps the way to address this is via ContentProvider’s)&lt;/p&gt;    &lt;p&gt;So please Microsoft, give me better PC to phone sync and synergy.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There’s more I could easily put on my list, but Christmas is coming soon, and I’m sure the elves in Redmond are busy working away at something. It’d be really nice if Microsoft addressed some of these, even in the form of an announcement and a time frame (and some CTP’s?); even better if they do it before Christmas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1782448" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WP7/default.aspx">WP7</category></item><item><title>Windows Phone 7 does COM ??</title><link>http://msmvps.com/blogs/bill/archive/2010/11/16/windows-phone-7-does-com.aspx</link><pubDate>Tue, 16 Nov 2010 00:12:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1782383</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1782383</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/16/windows-phone-7-does-com.aspx#comments</comments><description>&lt;p&gt;Wow, seems Windows Phone 7 supports COM inside !&amp;#160; &lt;a href="http://blog.walshie.me/2010/11/15/windows-phone-7-full-file-system-access-anyone/" target="_blank"&gt;Chris Walsh has been doing some “investigating” into the inners of Windows Phone 7&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Interesting, but also totally not usable in any production application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1782383" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WP7/default.aspx">WP7</category></item><item><title>Reflector and Windows Phone 7</title><link>http://msmvps.com/blogs/bill/archive/2010/11/15/reflector-and-windows-phone-7.aspx</link><pubDate>Mon, 15 Nov 2010 10:35:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1782323</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1782323</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/15/reflector-and-windows-phone-7.aspx#comments</comments><description>&lt;p&gt;If you&amp;rsquo;re like me and like to open reflector from the Visual Studio Tools menu, you&amp;rsquo;ll probably have noticed that you need to have a different configuration (or list) of assemblies when developing with Windows Phone 7.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;To make it simple to setup, I&amp;rsquo;ve attached a configuration file. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msmvps.com/cfs-filesystemfile.ashx/__key/CommunityServer.Components.PostAttachments/00.01.78.23.23/reflectorWP7.txt"&gt;download the attached configuration&lt;/a&gt; and save it to a writeable path&lt;/li&gt;
&lt;li&gt;In Visual Studio, click on the External Tools menu item (from the Tools menu), and add a new item:&lt;/li&gt;
&lt;li&gt;set the command path the path to the full path of reflector.exe&lt;/li&gt;
&lt;li&gt;make the Arguments: &lt;br /&gt;/configuration:&amp;quot;Full Path To config file\reflector_phone.txt&amp;quot;&amp;nbsp;&amp;nbsp; $(TargetPath) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/4705.image_5F00_4953AC9E.png"&gt;&lt;img height="392" width="399" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/4718.image_5F00_thumb_5F00_465E47EB.png" alt="image" border="0" title="image" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1782323" width="1" height="1"&gt;</description><enclosure url="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.01.78.23.23/reflectorWP7.txt" length="3616" type="text/plain" /><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WP7/default.aspx">WP7</category></item><item><title>Help Library Manager and error 0x80190194</title><link>http://msmvps.com/blogs/bill/archive/2010/11/13/help-library-manager-and-error-0x80190194.aspx</link><pubDate>Fri, 12 Nov 2010 23:58:35 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1782204</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1782204</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/13/help-library-manager-and-error-0x80190194.aspx#comments</comments><description>&lt;p&gt;Yesterday I noticed that the Windows Phone content had been updated online, but my local help library didn’t have the new content. So I thought I’d just open up Help Library Manager and update my local content. Sadly it wasn’t that simple. Help Library Manager would only let me update the entire collection, a process it never managed to complete. Each time help library manager failed it would have to start all over again, again saying it had to download about 2 GB of files.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The solution :&lt;/strong&gt; In the end, after a dozen or more attempts spanning most of the afternoon, I gave up and uninstalled all my existing help content. This allowed me to add back the books I wanted one by one and have them update when added.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The problem :&lt;/strong&gt;&amp;#160; When the help library manager does its updates, it doesn’t allow you to select an individual book, instead it demands to update all books. And if any download fails, it aborts the entire process. The error message you get is:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/1172.clip_5F00_image002_5F00_5DAEFA98.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/8037.clip_5F00_image002_5F00_thumb_5F00_5AB995E5.jpg" width="378" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you look in the Windows Application logs (via Event Viewer), you’ll find error messages such as :&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="1" face="Arial"&gt;An error occurred while updating local content: Microsoft.Help.CacheLib.CacheLibDownloadException: An error occurred while the BITS service was transferring &amp;#39;http://packages.mtps.microsoft.com/visual_studio_22759845_vs_100_en-us_6(e46593e9-d0e9-0b05-536f-729a38c64fa1).cab&amp;#39; to &amp;#39;C:\ProgramData\Microsoft\HelpLibrary\content\Microsoft\incoming\36d8cf67-0d25-406f-8a5e-3b6143bc3769\Visual_Studio_22759845_VS_100_en-us_6.cab&amp;#39;. The error context was &amp;#39;RemoteFile&amp;#39;, and the error code was &amp;#39;0x80190194&amp;#39;.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Searching for 0x80190194 and Help Library Manager won’t bring you much joy (&lt;em&gt;hopefully this blog post might change that&lt;/em&gt;).&lt;/p&gt;  &lt;p&gt;A bit of an insight might be able to be inferred from the event log. It says the error occurred at :&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="1" face="Arial"&gt;at Microsoft.Help.CacheLib.DocumentationCache.&amp;lt;&amp;gt;c__DisplayClass6c.&amp;lt;DownloadWebContent&amp;gt;b__69(IGrouping`2 chunk)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font color="#ff0000" size="1" face="Arial"&gt;&lt;strong&gt;at Microsoft.Help.CacheLib.Extensions.Each[T](IEnumerable`1 that, Action`1 lambda)&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="1" face="Arial"&gt;at Microsoft.Help.CacheLib.DocumentationCache.DownloadWebContent(IEnumerable`1 webDownloads, Int32 totalDownloads, Int32 completedDownloads, String workingDirectory, StatusCallback`1 statusCallback)&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Note: I’m only guessing here as I haven’t seen the code, by my guess is there is no individual error handling in the Action lambda.&amp;#160; It’s a if one fails the lot fails approach. I always think this is something to be wary of with enumerable and lambda expressions. Simple lambdas look clean and elegant but often aren’t robust. The result is all or not at all.&amp;#160; And when that result is “not at all” most of the time, then we’ve got a problem.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So the workaround&lt;/strong&gt; I employed was to limit the collection to start off with. This limited the “all” to a workable set.&amp;#160; But there’s lots more the team responsible for&amp;#160; the Help Library Manager should do (IMO).&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;First thing to do is publish a KB and blog post about error 0x80190194, and let people know what is going on (and what the team plans to do about it) and suggest workarounds (like above).     &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Fix the code. Add robust error handling that internally retries the download multiple times; and split it up so as the downloads that have succeeded are installed. Get over and get past the lazy all or not at all approach.     &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Fix the UI. Apart from the antiquated fixed dialogue window (instead of modern resizable), the UI should allow updating of individual books (aka products).&amp;#160; If I want the latest Windows Phone documentation right &lt;strong&gt;&lt;em&gt;NOW&lt;/em&gt;&lt;/strong&gt;, I don’t want to be waiting until all the other updates apply.      &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Provide downloads that can be installed offline. If you have multiple computers, you don’t want to be downloading 2GB for each one.     &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1782204" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Rant/default.aspx">Rant</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Bug/default.aspx">Bug</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item><item><title>Too many hyperlinks in your XAML ?</title><link>http://msmvps.com/blogs/bill/archive/2010/11/04/too-many-hyperlinks-in-your-xaml.aspx</link><pubDate>Thu, 04 Nov 2010 03:03:35 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1781542</guid><dc:creator>bill</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1781542</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/04/too-many-hyperlinks-in-your-xaml.aspx#comments</comments><description>&lt;p&gt;If you are editing XAML code in Visual Studio and seeing a lot of the code underlined as a hyperlink, the problem is you most likely have the “Enable single-click URL navigation” option selected.&amp;#160; It is best if you uncheck that option:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/1072.image_5F00_268A0E48.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/6765.image_5F00_thumb_5F00_4E00DAB2.png" width="631" height="353" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1781542" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/XML/default.aspx">XML</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category></item><item><title>PDC 2010 Sessions</title><link>http://msmvps.com/blogs/bill/archive/2010/11/03/pdc-2010-sessions.aspx</link><pubDate>Wed, 03 Nov 2010 00:49:59 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1781443</guid><dc:creator>bill</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/bill/rsscomments.aspx?PostID=1781443</wfw:commentRss><comments>http://msmvps.com/blogs/bill/archive/2010/11/03/pdc-2010-sessions.aspx#comments</comments><description>&lt;p&gt;You can view PDC 2010 sessions online at &lt;a href="http://microsoftpdc.com" target="_blank"&gt;microsoftpdc.com&lt;/a&gt; , but you can also download sessions to view later or copy over to your windows 7 phone &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bill.metablogapi/3678.wlEmoticon_2D00_smile_5F00_6C6C7C92.png" /&gt;&lt;/p&gt;  &lt;p&gt;The sessions info is all online in one nice big XML file :    &lt;br /&gt;&lt;a title="http://videoak.microsoftpdc.com/pdc_schedule/Schedule.xml" href="http://videoak.microsoftpdc.com/pdc_schedule/Schedule.xml"&gt;http://videoak.microsoftpdc.com/pdc_schedule/Schedule.xml&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Just scroll down or search for &amp;lt;DownloadableContent&amp;gt;&lt;/p&gt;  &lt;p&gt;Or if you want you can run some XLinq on it to make it into a nice html doc. Here’s my quick and dirty attempt:    &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;pre style="line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; doc = &lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;XDocument&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Load(&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;http://videoak.microsoftpdc.com/pdc_schedule/Schedule.xml&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;)&lt;br /&gt; &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sessions = doc&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;...&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;Session&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Dim&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; output = &lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#555555"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;From&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sess &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;In&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sessions &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Select&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;strong&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sess&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;.@&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;Code &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;%&amp;gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot; &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;%&amp;gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sess&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;.&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;ShortTitle&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Value &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;strong&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;font color="#555555"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;blockquote&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#555555"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000"&gt; sess&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;.&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;FullDescription&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.Value &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#555555"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;ul&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#555555"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;From&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; content &lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;In&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; sess&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;...&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;Content&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#3092b1"&gt;Select&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;a&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;span&gt;&lt;font color="#b96464"&gt;href&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;=&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; content&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;.@&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;Url &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;li&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;&amp;lt;%=&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; content&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;.@&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;Title &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;" color="#555555"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;li&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;a&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#555555"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;ul&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;font color="#555555"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;blockquote&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;font color="#555555"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;div&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#555555"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fffebf;"&gt;%&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;body&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#844646"&gt;html&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#6464b9"&gt;&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt; &lt;br /&gt;IO.&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;File&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.WriteAllText(&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Environment&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.GetFolderPath(&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;Environment&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;span&gt;&lt;font color="#000088"&gt;SpecialFolder&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;.Desktop) &amp;amp; &lt;br /&gt;                           &lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;background-position:0% 0%;"&gt;&lt;font style="background-color:#fefff0;" color="#a31515"&gt;&amp;quot;\session.html&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;, output.ToString)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1781443" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bill/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/bill/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/bill/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VB10/default.aspx">VB10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Design/default.aspx">Design</category><category domain="http://msmvps.com/blogs/bill/archive/tags/VS+10/default.aspx">VS 10</category><category domain="http://msmvps.com/blogs/bill/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://msmvps.com/blogs/bill/archive/tags/.NET+4.0/default.aspx">.NET 4.0</category></item></channel></rss>