<?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/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>MSMVPS.COM</title><link>http://msmvps.com/blogs/</link><description>The Ultimate Destination for Blogs by Current and Former Microsoft Most Valuable Professionals.
</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Why do?</title><link>http://msmvps.com/blogs/bradley/archive/2009/07/03/why-do.aspx</link><pubDate>Sat, 04 Jul 2009 01:28:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697825</guid><dc:creator>bradley</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Why do HP&amp;#39;s sound like a jet engine when they start up?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been told it&amp;#39;s the boot fan test they do.&lt;/p&gt;
&lt;p&gt;Why do servers attract dust &amp;quot;hippos&amp;quot;... not &amp;quot;bunnies&amp;quot; but &amp;quot;hippos&amp;quot; because there is downright dirt on the harddrives inside of servers.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/2260.dusthippos.PNG"&gt;&lt;img border="0" src="http://msmvps.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/2260.dusthippos.PNG" alt="" /&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=1697825" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bradley/archive/tags/News/default.aspx">News</category></item><item><title>Evil code of the day</title><link>http://msmvps.com/blogs/jon_skeet/archive/2009/07/03/evil-code-of-the-day.aspx</link><pubDate>Fri, 03 Jul 2009 22:28:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697785</guid><dc:creator>skeet</dc:creator><slash:comments>8</slash:comments><description>&lt;p&gt;At a glance, this code doesn&amp;#39;t look particularly evil. What does it do though? Compile it with the C# 4.0b1 compiler and run it...&lt;/p&gt;  &lt;div class="code"&gt;&lt;span class="Namespace"&gt;using&lt;/span&gt; System;     &lt;br /&gt;    &lt;br /&gt;&lt;span class="ReferenceType"&gt;class&lt;/span&gt; Base     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class="Modifier"&gt;public&lt;/span&gt;&amp;#160;&lt;span class="Modifier"&gt;virtual&lt;/span&gt;&amp;#160;&lt;span class="ValueType"&gt;void&lt;/span&gt; Foo(&lt;span class="ValueType"&gt;int&lt;/span&gt; x, &lt;span class="ValueType"&gt;int&lt;/span&gt; y)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&lt;span class="String"&gt;&amp;quot;Base: x={0}, y={1}&amp;quot;&lt;/span&gt;, x, y);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}     &lt;br /&gt;    &lt;br /&gt;&lt;span class="ReferenceType"&gt;class&lt;/span&gt; Derived : Base     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class="Modifier"&gt;public&lt;/span&gt;&amp;#160;&lt;span class="Modifier"&gt;override&lt;/span&gt;&amp;#160;&lt;span class="ValueType"&gt;void&lt;/span&gt; Foo(&lt;span class="ValueType"&gt;int&lt;/span&gt; y, &lt;span class="ValueType"&gt;int&lt;/span&gt; x)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(&lt;span class="String"&gt;&amp;quot;Derived: x={0}, y={1}&amp;quot;&lt;/span&gt;, x, y);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;span class="ReferenceType"&gt;class&lt;/span&gt; PureEvil     &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span class="Modifier"&gt;static&lt;/span&gt;&amp;#160;&lt;span class="ValueType"&gt;void&lt;/span&gt; Main()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Derived d = &lt;span class="Keyword"&gt;new&lt;/span&gt; Derived();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Base b = d;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&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; b.Foo(x: 10, y: 20);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; d.Foo(x: 10, y: 20);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/div&gt;  &lt;p&gt;The results are:&lt;/p&gt;  &lt;div class="output"&gt;Derived: x=20, y=10    &lt;br /&gt;Derived: x=10, y=20&lt;/div&gt;  &lt;p&gt;I&amp;#39;m very nearly tempted to leave it there and just see what the reactions are like, but I&amp;#39;ll at least give you a hint as to where to look - section 21.3 of the &lt;a href="http://download.microsoft.com/download/7/E/6/7E6A548C-9C20-4C80-B3B8-860FAF20887A/CSharp%204.0%20Specification.doc"&gt;C# 4 spec&lt;/a&gt; explains why this gives odd results. It does make perfect sense, but it&amp;#39;s hideously evil.&lt;/p&gt;  &lt;p&gt;I feel dirty.&lt;/p&gt;  &lt;h3&gt;Bonus questions&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;What happens if you rename the parameters in &lt;code&gt;Derived.Foo&lt;/code&gt; to &lt;code&gt;yy&lt;/code&gt; and &lt;code&gt;xx&lt;/code&gt;? &lt;/li&gt;    &lt;li&gt;(As suggested by Mehrdad) What happens if you call it with a dynamic value?&lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697785" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/jon_skeet/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/jon_skeet/archive/tags/C_2300_+4/default.aspx">C# 4</category></item><item><title>Up, down, up, down, up...</title><link>http://msmvps.com/blogs/arnogerretsen/archive/2009/07/03/up-down-up-down-up.aspx</link><pubDate>Fri, 03 Jul 2009 20:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697765</guid><dc:creator>arno</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Today and yesterday the FSDeveloper website had a little bit of downtime. We are working on solving these issues by optimizing the server. Besides that we have also been working on the backups and some other technical issues. Hopefully so much downtime won&amp;#39;t happen again soon, but at least you can be sure we are onto it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697765" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/arnogerretsen/archive/tags/FSDeveloper/default.aspx">FSDeveloper</category></item><item><title>China Testing Mac Version of Green Dam Web Filter</title><link>http://msmvps.com/blogs/donna/archive/2009/07/03/china-testing-mac-version-of-green-dam-web-filter.aspx</link><pubDate>Fri, 03 Jul 2009 20:31:34 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697763</guid><dc:creator>donna</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;China&amp;#39;s Ministry of Industry and Information Technology says the Green Dam mandate has only been delayed. Publisher Jinhui Computer System Engineering is reportedly testing a version of Green Dam for Apple&amp;#39;s Mac computers, which have been exempt. Tests found Green Dam to be vulnerable to malware and ineffective, even blocking images of Garfield. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.newsfactor.com/news/Mac-Version-of-Green-Dam-Expected/story.xhtml?story_id=0030006966ZO&amp;amp;full_skip=1"&gt;http://www.newsfactor.com/news/Mac-Version-of-Green-Dam-Expected/story.xhtml?story_id=0030006966ZO&amp;amp;full_skip=1&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697763" width="1" height="1"&gt;</description></item><item><title>SMS Remote Code Execution Vulnerability in iPhone</title><link>http://msmvps.com/blogs/donna/archive/2009/07/03/sms-remote-code-execution-vulnerability-in-iphone.aspx</link><pubDate>Fri, 03 Jul 2009 20:29:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697762</guid><dc:creator>donna</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Charlie Miller, a well-known security researcher who specializes in Mac and iPhone security, yesterday revealed information about a new vulnerability in iPhone that allows remote code execution via SMS. Not a lot is known about the vulnerability, which was announced at the SyScan conference in Singapore, except that Charlie is working with Apple to get it fixed as soon as possible. &lt;/p&gt;  &lt;p&gt;This is about as bad as it gets as the vulnerability seems to allow unsigned code to run which circumvents a core part of iPhone&amp;#39;s security model. It&amp;#39;s usually only able to run signed code, i.e. Apps that have been approved by Apple. No user-interaction is required which is unlike current mobile malware. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.f-secure.com/weblog/archives/00001714.html"&gt;http://www.f-secure.com/weblog/archives/00001714.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697762" width="1" height="1"&gt;</description></item><item><title>What does Windows Workflow Foundation 4 mean for existing workflow developers?</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/07/03/what-does-windows-workflow-foundation-4-mean-for-existing-workflow-developers.aspx</link><pubDate>Fri, 03 Jul 2009 20:12:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697760</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The question of what Windows Workflow Foundation version 4 means for developers currently developing using WF recently came up. As I mentioned before WF 4 is a complete rewrite and doesn’t use any of the existing WF 3 classes. The design of WF 4 is even quite different from the design of WF 3.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So are WF 3 developers completely left in the dark and have to start from scratch? And what about their existing applications, will they still run on .NET 4 or are they stuck in .NET 3.5 until the end of times?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Fist of all let me address why I believe Microsoft could make such a radical change. Keep i mind this is just my personal opinion and I might be completely wrong &lt;img src="http://msmvps.com/emoticons/emotion-5.gif" alt="Wink" /&gt;. &lt;/p&gt;  &lt;p&gt;WF 3 was never widely adopted so I believe the team felt they could do this and not create too much of a problem. Personally I don&amp;#39;t think the low adoption of WF 3 had anything to do with the technology. Sure it has its problems but most people never got to the point that they ran into real technical issues. Instead most people looked, didn&amp;#39;t understand and quit. So IMHO the main problem was far more a question if evangelism that technology.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So what is the big issue with a migration from WF 3 to WF 4?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;One big issue with WF 4 is that Microsoft decided not to release a state machine implementation. In WF 3 there was a choice between state machine and sequential workflows. In WF 4 there is a choice between sequential and flow chart. And in WF 3 a state machine turned out to be far more flexible and useful and quite a few cases are not really covered by the WF 4 model. There are a few workarounds to do something like a state machine in WF 4 but they are not pretty. That said, a number of state machine workflows could very well be done using a flow chart.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As far as backward compatibility the story is a bit more complicated. WF 4 ships with an interop activity you can use to host custom WF 3 activities in a WF 4 workflow. How good or bad this is? I really don&amp;#39;t know yet but given how different the two designs are I fear it is very limited.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;But WF 3 developers need not worry about their existing projects!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There is however a second side to the compatibility story. .NET 4 will ship both with the WF 3 and the WF 4 runtimes. The WF 3 runtime will not be prominent but it will still be there so all existing WF 3 applications will continue to run as is. And because it is part of the current .NET framework I suspect this is a legal requirement (but then I am no lawyer so could be wrong here). So there is no reason for existing workflow developers to panic just yet &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So existing workflow developers should start learning WF 4 for future projects but can continue to keep using their existing WF 3 solutions for the foreseeable future.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;   &lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697760" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WF4/default.aspx">WF4</category></item><item><title>Waledac Independence Day Theme - New Campaign In The Wild </title><link>http://msmvps.com/blogs/donpatterson/archive/2009/07/03/waledac-independence-day-theme-new-campaign-in-the-wild.aspx</link><pubDate>Fri, 03 Jul 2009 19:31:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697753</guid><dc:creator>Don</dc:creator><slash:comments>0</slash:comments><description>&lt;p class="text2"&gt; Websense Security Labs&amp;trade; ThreatSeeker&amp;trade; Network has
detected yet another new Waledac campaign theme in the wild. The new
variant uses an Independence Day theme as a social engineering
mechanism. The United States of America celebrates &lt;a href="http://en.wikipedia.org/wiki/Independence_Day_%28United_States%29"&gt;Independence Day&lt;/a&gt; on July 4 each year. 
&lt;/p&gt;
&lt;p&gt;The malicious emails that are sent use subjects and content related to Independence Day, Fourth of July and fireworks shows. &lt;/p&gt;
&lt;p&gt;The malicious Web sites in the current attack also have a July 4 or
fireworks theme within the domain name. ThreatSeeker has been
monitoring the registration of these domains. Should the user click on
the video, which is designed to appear to be a YouTube video, an .exe
is offered. When downloaded the .exe would install the latest Waledac
variant onto the user&amp;#39;s machine. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://securitylabs.websense.com/content/Alerts/3431.aspx"&gt;Alert Details&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697753" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/donpatterson/archive/tags/Alerts/default.aspx">Alerts</category></item><item><title>Clean install part 2</title><link>http://msmvps.com/blogs/bradley/archive/2009/07/03/clean-install-part-2.aspx</link><pubDate>Fri, 03 Jul 2009 18:21:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697745</guid><dc:creator>bradley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/5810.easy.PNG"&gt;&lt;img border="0" src="http://msmvps.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/5810.easy.PNG" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next step is to copy over everything that might blow up.&lt;/p&gt;
&lt;p&gt;While I do use the Easy transfer wizard, I also copy over things manually for that 1 out of 10 time that Easy transfer doesn&amp;#39;t work and Krissy gets my bed for the evening.&lt;/p&gt;
&lt;p&gt;Grab an extra copy of the User\Username\Desktop folder just in case along with the NK2 file&lt;/p&gt;
&lt;p&gt;Migrating Outlook Autocomplete Data (NK2 File Data) to a New Vista/Office 2007 Computer - Realtime Windows Server: &lt;br /&gt;&lt;a href="http://www.realtime-windowsserver.com/tips_tricks/2007/06/migrating_outlook_autocomplete.htm"&gt;http://www.realtime-windowsserver.com/tips_tricks/2007/06/migrating_outlook_autocomplete.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next up is exporting out Outlook.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697745" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bradley/archive/tags/News/default.aspx">News</category></item><item><title>Before you do a clean install of the network</title><link>http://msmvps.com/blogs/bradley/archive/2009/07/03/before-you-do-a-clean-install-of-the-network.aspx</link><pubDate>Fri, 03 Jul 2009 17:55:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697741</guid><dc:creator>bradley</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A little work needs to be done on the workstations.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/2260.userchange.PNG"&gt;&lt;img border="0" src="http://msmvps.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/2260.userchange.PNG" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Long story short, I want to do a clean install on my home Server even though I had migrated it successfully.&amp;nbsp; But before you do the &amp;quot;small network of users, clean install of SBS 2008, don&amp;#39;t mess with the Sister&amp;#39;s customized Disney desktop otherwise your 4th of July weekend will be spent in the doghouse (we share a house together) and the dog will be sleeping in your bed, you need to ensure you can flip the workstations off the network.&amp;nbsp; Go into control panel, users, and reset that local admin password that you probably can&amp;#39;t remember anymore and make them an administrator, and make the domain user an admin for temporary purposes while you are getting ready to copy files and back up that profile.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;To make the user an admin, go into the properties, into group membership and ensure that they are an administrator for a short time (you can flip them back later)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/8446.properties.PNG"&gt;&lt;img border="0" src="http://msmvps.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Blogs.Components.WeblogFiles/bradley/8446.properties.PNG" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This ensures you can flip the workstation back to the workgroup mode before rejoining the domain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697741" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bradley/archive/tags/News/default.aspx">News</category></item><item><title>XML Literals: Simplifying Strings</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/xml-literals-simplifying-strings.aspx</link><pubDate>Fri, 03 Jul 2009 17:51:02 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697738</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;You have probably heard that the next version of VB will no longer require line continuation characters in most situations. This is very good news for those of us that do not like typing underscore characters.&lt;/p&gt;  &lt;p&gt;But in the mean time, what do we do if we have a long string, like a SQL string:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim mySelect As String = &amp;quot;Select CustomerId, &amp;quot; &amp;amp; _      &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;quot;LastName, &amp;quot; &amp;amp; _       &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;quot;FirstName, &amp;quot; &amp;amp; _       &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;quot;EmailAddress &amp;quot; &amp;amp; _       &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;quot;From Customer &amp;quot; &amp;amp; _       &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;quot;Where CustomerId = @CustomerID&amp;quot;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And this one is only selecting three fields!&lt;/p&gt;  &lt;p&gt;XML Literals can help:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim mySelect2 As XElement = &amp;lt;string&amp;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; Select CustomerId,       &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; LastName,       &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; FirstName,       &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; EmailAddress       &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; From Customer       &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; Where CustomerId = @CustomerId       &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;lt;/string&amp;gt;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Notice in the XML literals example that there are no quotes, ampersands (&amp;amp;) or underscores (_). That can save a lot of typing and it is easier to read.&lt;/p&gt;  &lt;p&gt;Since mySelect2 is an XElement, use the Value property to get the string from the element.&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;mySelect2.Value&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697738" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/Xml/default.aspx">Xml</category></item><item><title>Lambdas: Aggregating Strings</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/lambdas-aggregating-strings.aspx</link><pubDate>Fri, 03 Jul 2009 17:24:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697732</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Looping through a list to append strings is often more challenging than it should be. For example…&lt;/p&gt;  &lt;p&gt;In C#:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;string emailAddresses=string.Empty;     &lt;br /&gt;foreach (Customer c in custList)      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; emailAddresses += c.EmailAddress + &amp;quot;;&amp;quot;;      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim emailAddresses As String = String.Empty     &lt;br /&gt;For Each c As Customer In custList      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; emailAddresses &amp;amp;= c.EmailAddress &amp;amp; &amp;quot;;&amp;quot;      &lt;br /&gt;Next&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Both of these examples pose a problem because the emailAddresses string ends up with an extra “;” at the end. So you can add extra code to remove it after the loop, add code in the loop that checks whether you are on the last one and skip appending the “;”, or append the “;” to the beginning instead and skip the first one. In any case, it wastes time to deal with this.&lt;/p&gt;  &lt;p&gt;NOTE: The definition of the Customer class and the list of customers (custList) used in this example can be found &lt;a href="http://msmvps.com/blogs/deborahk/archive/2009/07/03/generics-building-a-list-of-customers.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Using lambdas and the Aggregate extension method, this task is a breeze:&lt;/p&gt;  &lt;p&gt;In C#:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;string email = custList.Select(c =&amp;gt; c.EmailAddress)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .Aggregate((items, item) =&amp;gt; items + &amp;quot;; &amp;quot; + item);&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim email As String = custList.Select(Function(c) c.EmailAddress) _     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .Aggregate(Function(items, item) items &amp;amp; &amp;quot;; &amp;quot; &amp;amp; item)&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;The Select method first selects the email address for each customer. The Aggregate method then appends the email addresses together. And this code correctly handles the &amp;#39;”;” so you don’t have to think about it.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697732" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/Lambda/default.aspx">Lambda</category></item><item><title>MVP Summit 2009</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/mvp-summit-2009.aspx</link><pubDate>Fri, 03 Jul 2009 16:48:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697727</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;At the MVP Summit this year, &lt;a href="http://blogs.msdn.com/bethmassi/" target="_blank"&gt;Beth Massi&lt;/a&gt; interviewed me for the &lt;a href="http://channel9.msdn.com/posts/funkyonex/Im-a-VB-Interview-Deborah-Kurata-Visual-Basic-MVP/" target="_blank"&gt;“I’m a VB” series&lt;/a&gt;. &lt;a href="http://channel9.msdn.com/posts/Charles/Alan-Cooper-Questions-after-his-keynote/?CommentID=167403" target="_blank"&gt;Alan Cooper&lt;/a&gt; introduced me to VB back around 1992 (VB 2.0), so it was fun to talk about my favorite things in VB.&lt;/p&gt;  &lt;p&gt;Any thoughts on the interview? I’d love to hear them!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697727" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category></item><item><title>LINQ: Defining a List of Integers</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/linq-defining-a-list-of-integers.aspx</link><pubDate>Fri, 03 Jul 2009 16:39:05 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697724</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Defining a list of integers in your code involves lots of tedious typing.&lt;/p&gt;  &lt;p&gt;In VB, you can’t do this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;font color="#65402e"&gt;&amp;#39;Dim numberList As new List(Of Integer) = {1, 2, 3, 4, 5, 6, 7, 8, 9}&lt;/font&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So you have to either add numbers to the list manually, or create an array, which still involves lots of tedious typing:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim numberList() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;With .NET 3.5, you can instead use the Range method of the Enumerable class that is part of the System.Linq namespace.&lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim numberList2 As List(Of Integer) = Enumerable.Range(1, 9).ToList&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In C#:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;List&amp;lt;int&amp;gt; numberList2 = Enumerable.Range(1, 9).ToList();&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The first parameter of the Range method defines the first integer of the sequence. The second parameter defines the number of items in the sequence. So Range(0,9) provides 9 integers from 0 through 8.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697724" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Reflection: Displaying a Form By Name</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/reflection-displaying-a-form-by-name.aspx</link><pubDate>Fri, 03 Jul 2009 16:20:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697720</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There may be situations when you want to display a form by its form name. For example, say that you retain your menu options in a database so they can be customized. You want to associated a menu option with the display of a particular form. So you store the form name in the table.&lt;/p&gt;  &lt;p&gt;But then you need a way to show that form at runtime. For this, you need reflection.&lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim formName as string = &amp;quot;CustomerForm&amp;quot;     &lt;br /&gt;Dim assemblyName As String = My.Application.Info.AssemblyName      &lt;br /&gt;Dim componentName As String = assemblyName &amp;amp; &amp;quot;.&amp;quot; &amp;amp; formName      &lt;br /&gt;Dim type As Type = type.GetType(componentName, False, True)      &lt;br /&gt;Dim form As Form = TryCast(Activator.CreateInstance(type), Form)      &lt;br /&gt;form.ShowDialog()&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In C#:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;string formName = &amp;quot;CustomerForm&amp;quot;;     &lt;br /&gt;string assemblyName = Assembly.GetExecutingAssembly().GetName().Name;      &lt;br /&gt;string componentName&amp;#160; = assemblyName + &amp;quot;.&amp;quot; + formName;      &lt;br /&gt;Type type = Type.GetType(componentName, false, true);      &lt;br /&gt;Form form = (Form)Activator.CreateInstance(type);      &lt;br /&gt;form.ShowDialog();&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;This code first determines the component name by appending the assembly name and form name. This code assumes that the form is in the current assembly. If that is not the case, you could instead store the assembly name in the table and use it in the above code.&lt;/p&gt;  &lt;p&gt;The code then gets the appropriate type for the component and uses CreateInstance to create an instance of that type.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697720" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category></item><item><title>OfType: Finding Objects of a Particular Type</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/oftype-finding-objects-of-a-particular-type.aspx</link><pubDate>Fri, 03 Jul 2009 15:52:08 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697717</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I ran across the OfType feature a few months ago and find it to be very useful. OfType is one of the many extension methods on IEnumerable that was provided with .NET 3.5.&lt;/p&gt;  &lt;p&gt;If you ever need to search through a list for a particular type of object, then this feature is for you. The most common scenario for this feature is in working with the user interface. Say you want to hook up a particular event handler to every Button on your form. Or you want to go through your form and clear every TextBox. &lt;/p&gt;  &lt;p&gt;Previously, you would have to use a for or for/each loop and check the type of each object before you process it. Now, you can do this…&lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;For Each tb As TextBox In activeTab.Controls.OfType(Of TextBox)()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; tb.Text = String.Empty      &lt;br /&gt;Next&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;In C#:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;foreach (TextBox tb in this.Controls.OfType&amp;lt;TextBox&amp;gt;())     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160; tb.Text = string.Empty;      &lt;br /&gt;}&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697717" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category></item><item><title>Generics: Building a List of Customers</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/03/generics-building-a-list-of-customers.aspx</link><pubDate>Fri, 03 Jul 2009 15:23:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697709</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Often times applications require lists of things: lists of customers, lists of experiments, lists of accounts and so on. The generic lists provided in .NET 2.0 made working with these lists easy. And the list initializers in C# and the object initializers in VB make lists easier still.&lt;/p&gt;  &lt;p&gt;As an example, here is a first draft of a simple Customer class.&lt;/p&gt;  &lt;p&gt;In C#:&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;public class Customer     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public int CustomerId { get; set; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public string LastName { get; set; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public string FirstName { get; set; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public string EmailAddress { get; set; }       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The above code takes advantage of automatically implemented properties. VB does not yet have this feature, but it is expected with VB 10.&lt;/p&gt;  &lt;p&gt;In VB:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Public Class Customer&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;&amp;#160;&amp;#160;&amp;#160; Private _CustomerId As Integer     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public Property CustomerId() As Integer      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Get      &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; Return _CustomerId      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Get      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Set(ByVal value As Integer)      &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; _CustomerId = value      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Set      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Property&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;&amp;#160;&amp;#160;&amp;#160; Private _FirstName As String     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public Property FirstName() As String      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Get      &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; Return _FirstName      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Get      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Set(ByVal value As String)      &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; _FirstName = value      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Set      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Property &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;&amp;#160;&amp;#160;&amp;#160; Private _LastName As String&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public Property LastName() As String      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Get      &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; Return _LastName      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Get      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Set(ByVal value As String)      &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; _LastName = value      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Set      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Property&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;&amp;#160;&amp;#160;&amp;#160; Private _EmailAddress As String     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Public Property EmailAddress () As String      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Get      &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; Return _EmailAddress       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Get      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Set(ByVal value As String)      &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; _EmailAddress = value      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Set      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Property       &lt;br /&gt;End Class&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Most often, you would read the customers from a database and build the list. But there are times where you may want to build the list manually. For example, for prototyping or testing.&lt;/p&gt;  &lt;p&gt;With C#, you can build a list of customers in one line of code:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;List&amp;lt;Customer&amp;gt; custList = new List&amp;lt;Customer&amp;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; {new Customer()       &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; { CustomerId = 1,       &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; FirstName=&amp;quot;Bilbo&amp;quot;,      &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; LastName = &amp;quot;Baggins&amp;quot;,      &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; EmailAddress = &amp;quot;bb@hob.me&amp;quot;},      &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; new Customer()       &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; { CustomerId = 2,       &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; FirstName=&amp;quot;Frodo&amp;quot;,      &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; LastName = &amp;quot;Baggins&amp;quot;,      &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; EmailAddress = &amp;quot;fb@hob.me&amp;quot;},      &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; new Customer()       &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; { CustomerId = 3,       &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; FirstName=&amp;quot;Samwise&amp;quot;,      &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; LastName = &amp;quot;Gamgee&amp;quot;,      &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; EmailAddress = &amp;quot;sg@hob.me&amp;quot;},      &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; new Customer()       &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; { CustomerId = 4,       &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; FirstName=&amp;quot;Rosie&amp;quot;,      &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; LastName = &amp;quot;Cotton&amp;quot;,      &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; EmailAddress = &amp;quot;&lt;a href="mailto:rc@hob.me"&gt;rc@hob.me&lt;/a&gt;&amp;quot;}};&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The above example takes advantage of the list initializers feature of C#. VB does not yet have this feature, but it is expected in VB10.&lt;/p&gt;  &lt;p&gt;The code to do this in VB takes advantage of object initializers:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim custList As New List(Of Customer)      &lt;br /&gt;custList.Add(New Customer With {.CustomerId = 1 _      &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;&amp;#160;&amp;#160;&amp;#160; .LastName = &amp;quot;Baggins&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .FirstName = &amp;quot;Bilbo&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .EmailAddress=&amp;quot;&lt;/font&gt;&lt;a href="mailto:bb@hob.me"&gt;&lt;font color="#65402e" face="Consolas"&gt;bb@hob.me&lt;/font&gt;&lt;/a&gt;&lt;font color="#65402e" face="Consolas"&gt;})     &lt;br /&gt;custList.Add(New Customer With {.CustomerId = 2 _      &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;&amp;#160;&amp;#160;&amp;#160; .LastName = &amp;quot;Baggins&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .FirstName = &amp;quot;Frodo&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .EmailAddress = &lt;/font&gt;&lt;a href="mailto:fb@hob.me"&gt;&lt;font color="#65402e" face="Consolas"&gt;fb@hob.me&lt;/font&gt;&lt;/a&gt;&lt;font color="#65402e" face="Consolas"&gt;})     &lt;br /&gt;custList.Add(New Customer With {.CustomerId = 3, _      &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;&amp;#160;&amp;#160;&amp;#160; .LastName = &amp;quot;Gamgee&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .FirstName = &amp;quot;Samwise&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .EmailAddress = &lt;/font&gt;&lt;a href="mailto:sg@hob.me"&gt;&lt;font color="#65402e" face="Consolas"&gt;sg@hob.me&lt;/font&gt;&lt;/a&gt;&lt;font color="#65402e" face="Consolas"&gt;})      &lt;br /&gt;custList.Add(New Customer With {.CustomerId = 4, _      &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;&amp;#160;&amp;#160;&amp;#160; .LastName = &amp;quot;Cotton&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .FirstName = &amp;quot;Rosie&amp;quot;, _      &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;&amp;#160;&amp;#160;&amp;#160; .EmailAddress = &lt;/font&gt;&lt;a href="mailto:rc@hob.me"&gt;&lt;font color="#65402e" face="Consolas"&gt;rc@hob.me&lt;/font&gt;&lt;/a&gt;&lt;font color="#65402e" face="Consolas"&gt;})&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Notice the With statement in this VB code.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697709" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category></item><item><title>Comodo removed Ask/IAC SafeSurf Toolbar by replacing it with HopSurf/IAC/Ask Toolbar</title><link>http://msmvps.com/blogs/donna/archive/2009/07/03/comodo-removed-ask-iac-safesurf-toolbar-by-replacing-it-with-hopsurf-iac-ask-toolbar.aspx</link><pubDate>Fri, 03 Jul 2009 14:45:46 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697703</guid><dc:creator>donna</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;So Comodo’s promise to remove SafeSurf Toolbar happened but not to finish their agreement with A$k/IAC.&amp;#160; Instead, the new version of Comodo is now bundled with HopSurf Toolbar which is IAC/Ask.com too.&amp;#160; The installer become worst because there’s &lt;strong&gt;no EULA presented&lt;/strong&gt; in addition to known method of misleading people by offering unnecessary third party service/component in a SECURITY software.&amp;#160; Note that it is a security software that should offer clean installer no?&lt;/p&gt;  &lt;p&gt;Screenshots at &lt;a title="http://www.calendarofupdates.com/updates/index.php?s=&amp;amp;showtopic=19279&amp;amp;view=findpost&amp;amp;p=83848" href="http://www.calendarofupdates.com/updates/index.php?s=&amp;amp;showtopic=19279&amp;amp;view=findpost&amp;amp;p=83848"&gt;http://www.calendarofupdates.com/updates/index.php?s=&amp;amp;showtopic=19279&amp;amp;view=findpost&amp;amp;p=83848&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Their announcement says:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;What&amp;#39;s New In 3.10.101801.529?      &lt;br /&gt;==============================       &lt;br /&gt;&lt;strong&gt;NEW! COMODO Secure DNS is introduced as a new free service&lt;/strong&gt;       &lt;br /&gt;&lt;strong&gt;NEW! COMODO HopSurf Toolbar - COMODO SafeSurf Toolbar has been discontinued and superseded by COMODO HopSurf Toolbar        &lt;br /&gt;&lt;/strong&gt;NEW! CIS now allows the users to change the URL for the program and virus updates       &lt;br /&gt;IMPROVED! CIS now has a better support for Windows Security Center integration in Windows Vista SP1 and later       &lt;br /&gt;IMPROVED! AV engine now supports more archives and has better detection capabilities       &lt;br /&gt;IMPROVED! Direct disk access false alerts have been reduced       &lt;br /&gt;FIXED! Some applications do not run when CIS is installed in Vista 64 bit       &lt;br /&gt;FIXED! Antivirus scans excluded folders       &lt;br /&gt;FIXED! Firewall does not show some connections under high load       &lt;br /&gt;FIXED! Firewall sometimes causes the PC to freeze in windows XP 32       &lt;br /&gt;FIXED! cfp.exe crashes when HIPS alerts timeout&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a title="http://forums.comodo.com/feedbackcommentsannouncementsnews_cis/comodo_internet_security_310101801529_released-t41954.0.html" href="http://forums.comodo.com/feedbackcommentsannouncementsnews_cis/comodo_internet_security_310101801529_released-t41954.0.html"&gt;http://forums.comodo.com/feedbackcommentsannouncementsnews_cis/comodo_internet_security_310101801529_released-t41954.0.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That &lt;strong&gt;&lt;em&gt;NEW! COMODO Secure DNS is introduced as a new free service&lt;/em&gt;&lt;/strong&gt; is from DNSadvantage.com/Neustar, Inc. and again, this &lt;strong&gt;&lt;em&gt;NEW! COMODO HopSurf Toolbar - COMODO SafeSurf Toolbar has been discontinued and superseded by COMODO HopSurf Toolbar&lt;/em&gt;&lt;/strong&gt; means you need to agree with (not included EULA in the installer) the EULA in using Ask Toolbar/IAC/Ask.com service.&amp;#160; See HopSurf EULA online: &lt;a title="https://accounts.comodo.com/hp/management/eula" href="https://accounts.comodo.com/hp/management/eula"&gt;https://accounts.comodo.com/hp/management/eula&lt;/a&gt; or &lt;a title="http://www.hopsurf.com/license.jsp" href="http://www.hopsurf.com/license.jsp"&gt;http://www.hopsurf.com/license.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697703" width="1" height="1"&gt;</description></item><item><title>Vendo Zune 120gb</title><link>http://msmvps.com/blogs/albertosilva/archive/2009/07/03/vendo-zune-120gb.aspx</link><pubDate>Fri, 03 Jul 2009 14:30:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697700</guid><dc:creator>Alberto Silva</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Logo a seguir a ter saído a 3ª geração dos Zune, comprei o modelo de 120gb em preto, que mandei vir dos EUA. A utilização do equipamento, a ouvir música, ver vídeos, acompanhar podcasts e a partir de uma versão do firmware, até jogar, confirmaram as excelentes referências que tinha do equipamento. Na altura aproveitei e mandei vir um conjunto de cabos A/V que consiste num cabo audio que permite ligar o Zune a um equipamento que tenha uma entrada auxiliar tipo jack 3.5mm, como os sistemas de som de muitos carros, e outro que tem 3 ‘bananas’ RCA que serve de output video e som, para ligar a amplificadores A/V e televisores.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/albertosilva.metablogapi/0435.zune1_5F00_0A52389F.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="zune1" border="0" alt="zune1" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/albertosilva.metablogapi/5807.zune1_5F00_thumb_5F00_509F78E7.png" width="246" height="423" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Como não lhe dou grande uso, e para o que dou, um telemóvel com Windows Mobile e um cartão de 8gb serve, vou pô-lo à venda por 175€, o que inclui para além do Zune, 2 cabos de sincronização USB originais, os auscultadores originais, &lt;a href="http://www.zune.net/en-US/products/z/zunecablepack/details.page/" target="_blank"&gt;cabos A/V&lt;/a&gt; e a caixa original do Zune, entregando em mão em Aveiro e Coimbra, ou menos frequentemente, em Lisboa. O equipamento está como novo, e sem riscos no ecrã.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/albertosilva.metablogapi/6708.zune2_5F00_40CFBE16.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="zune2" border="0" alt="zune2" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/albertosilva.metablogapi/5381.zune2_5F00_thumb_5F00_2B9192A1.png" width="216" height="165" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Podem ver todas as características &lt;a href="http://www.zune.net/en-us/mp3players/zune120/default.htm" target="_blank"&gt;aqui&lt;/a&gt;, destacando o Wifi para sincronização com o PC ou partilha entre Zunes, o rádio FM com RDS, a qualidade do ecrã, a navegação intuitiva com o botão sensível a gestos. Para quem tiver um PC com o Windows Media Center, pode ainda sincronizar os programas que vai gravando no PC com o Zune. Para quem tem o bichinho da programação, &lt;a href="http://forums.zune.net/58/ShowForum.aspx" target="_blank"&gt;podem usar XNA para desenvolver jogos para o Zune&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Se estiver interessado, contacte-me por mail para albertosilva depois mundomovel ponto com. Se o Zune for vendido entretanto, actualizo o post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697700" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/albertosilva/archive/tags/Off-topic_2E00__2E00__2E00_/default.aspx">Off-topic...</category></item><item><title>Multithreading: using fences from .NET code</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/03/multithreading-using-fences-from-net-code.aspx</link><pubDate>Fri, 03 Jul 2009 14:28:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697699</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In the last &lt;a href="http://msmvps.com/blogs/luisabreu/archive/2009/07/03/multithreading-introducing-memory-fences.aspx"&gt;post&lt;/a&gt;, we’ve talked about memory fences. Today we’re going to keep looking at this topic, but we’re turning our attention to coding, ie, we’re going to talk about the options we have to add fences to our classes. In .NET, things are relatively straightforward. &lt;/p&gt;  &lt;p&gt;Whenever we use one of the interlocked methods we’ve &lt;a href="http://msmvps.com/blogs/luisabreu/archive/2009/07/02/multithreading-introducing-the-interlocked-operations.aspx"&gt;met&lt;/a&gt; in the past, we’re adding a full fence to our code. Locking will also end up using full fences. As you can see,&amp;#160; you’re already using full fences in several places. The good news is that you can also be specific about them, ie, there’s a method you can call if you want to add a fence to your code in a specific place: I’m talking about the &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.memorybarrier.aspx"&gt;Thread.MemoryBarrier&lt;/a&gt; static method (btw, this method will also add a&amp;#160; full fence).&lt;/p&gt;  &lt;p&gt;Volatile reads or writes generate fences too! In C#, you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/x13ttww7(VS.71).aspx"&gt;volatile&lt;/a&gt; keyword to mark a field as volatile. Reading a &lt;a href="http://msdn.microsoft.com/en-us/library/x13ttww7(VS.71).aspx"&gt;volatile&lt;/a&gt; field is the “equivalent” of having an acquiring fence. Writing to a &lt;a href="http://msdn.microsoft.com/en-us/library/x13ttww7(VS.71).aspx"&gt;volatile&lt;/a&gt; field can be seen as “adding” a release fence. Now, it’s important to notice that you’ll always get these read and write behaviors whenever you use the volatile field. If you’re looking for more control (ex.: you’ll only interested in having an acquire fence for a read), then you should rely on the &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.volatileread.aspx"&gt;Thread.VolatileRead&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.volatilewrite.aspx"&gt;Thread.VolatileWrite&lt;/a&gt; methods for ensuring proper the desired behavior.&lt;/p&gt;  &lt;p&gt;And I guess that’s all there’s time for today. In the next post, we’ll keep looking at multithreading and see how we can use these features on a C# program. Keep tuned!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697699" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/Multithreading/default.aspx">Multithreading</category></item><item><title>Cold Fusion web sites compromised when HTML editor enabled </title><link>http://msmvps.com/blogs/harrywaldron/archive/2009/07/03/cold-fusion-web-sites-compromised-when-html-editor-enabled.aspx</link><pubDate>Fri, 03 Jul 2009 13:55:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697693</guid><dc:creator>Harry Waldron</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;img src="http://msmvps.com/emoticons/emotion-37.gif" alt="Storm" /&gt; &lt;strong&gt;Web ADMINS should ensure the HTML text editor is secured as it may be automatically installed by default&lt;/strong&gt; on some versions of Cold Fusion studio.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;img src="http://msmvps.com/emoticons/emotion-60.gif" alt="Lightning" /&gt;&lt;strong&gt; Large # of Cold Fusion web sites&amp;nbsp;compromised in past 24 hours&lt;/strong&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=6715"&gt;http://isc.sans.org/diary.html?storyid=6715&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;QUOTE&lt;/strong&gt;: There have been a &lt;strong&gt;high number of Cold Fusion web sites being compromised in last 24 hours&lt;/strong&gt;. It appears that the attackers are exploiting web sites which have older installations of some Cold Fusion applications. These applications have vulnerable installations of FCKEditor, which is a very popular HTML text editor, or CKFinder, which is an Ajax file manager.&lt;/p&gt;
&lt;p&gt;The vulnerable installations allow the attackers to upload ASP or Cold Fusion shells which further allow them to take complete control over the server. It appears that there are two attack vectors (both using vulnerable FCKEditor installations though) that the attackers are exploiting. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to disable the HTML editor to improve safety&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://www.codfusion.com/blog/post.cfm/cf8-and-fckeditor-security-threat"&gt;http://www.codfusion.com/blog/post.cfm/cf8-and-fckeditor-security-threat&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697693" width="1" height="1"&gt;</description></item><item><title>Multithreading: introducing memory fences</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/03/multithreading-introducing-memory-fences.aspx</link><pubDate>Fri, 03 Jul 2009 12:58:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697685</guid><dc:creator>luisabreu</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A few posts back, we’ve introduced the &lt;a href="http://msmvps.com/blogs/luisabreu/archive/2009/06/29/multithreading-load-and-store-reordering.aspx"&gt;concept&lt;/a&gt; of load and store reordering. As we’ve seen, reordering operations exist as a way of improving performance and can be introduced on several levels (starting at compilation time and ending at runtime when the processor executes the instructions). We &lt;a href="http://msmvps.com/blogs/luisabreu/archive/2009/06/29/multithreading-load-and-store-reordering.aspx"&gt;saw&lt;/a&gt; that even though things can get chaotic quickly, there are some guarantees we can hold on to when writing multithreaded code. One of those guarantees is that all platforms respect a specific memory model and that’s what we’ll be talking about in this post.&lt;/p&gt;  &lt;p&gt;A memory model defines which kinds of moves may occur&amp;#160; (ie, which loads and stores can be moved). If you’ve got a weak memory model, then you’ll get plenty of allowable moves and this will lead to a superior performance. However, you’ll also need to pay lots of attention to the code you write. Allowing less moves will, of course, lead to less complexity but won’t give you (hum…I mean, the compiler and processor) that many chances for updating your code.&lt;/p&gt;  &lt;p&gt;Since we’re talking about .NET here, we’ll focus the rest of the post on the valid assumptions for the CLR. The CLR has a strong memory model. In practice, this means that several compiler optimizations are forbidden&amp;#160; and that it should be fairly easy (sort of…) to write code that is portable across several architectures where the code might run. Before going on, it’s important to notice that the CLR memory model is tighter than the one you get in the ECMA spec.&lt;/p&gt;  &lt;p&gt;In the CLR, you can get reordering for load/load, load/store and store/load. The only one which isn’t permitted is store/store reordering (meaning that a store can never move after another store). Volatile loads and stores are different and only allow store/load reordering (we’ll be talking about volatiles in future posts). Btw, the ECMA specification allows all these move types.&lt;/p&gt;  &lt;p&gt;Ok, so if those store and load reordering are allowed, how can we stopped them from happening? ah, glad you asked! We can use fences (or barriers) to ensure that they don’t occur at specific times.&lt;/p&gt;  &lt;p&gt;A fence (aka barrier) prevents memory loads and stores reordering from happening. There are several types of fences. Full fences are probably the most known and used type. A full fence ensures that no load or stores moves across the fence (ie, no load or store before the fence can move after it nor any load or store placed after the fence may move before it).&lt;/p&gt;  &lt;p&gt;Besides the ubiquitous full fence (which is available everywhere), there are other variations. With Store fences, no store can move over the fence (it’s ok for reorders to happen with loads). Load fences are similar, but in this case, only loads are “fixed”.&lt;/p&gt;  &lt;p&gt;Finally, there’s also a couple of “one way” fences: acquire and release fences. Acquire fences ensures that no memory operation that happens after the fence can be moved before the fence. Release fences work the other way around: instructions defined after the fence may happen before the fence but no “pre-fence” instruction may happen after the fence. &lt;/p&gt;  &lt;p&gt;As you might have guessed by now, fences load to a more sequential model which will, without any doubt, lead to a degradation of your application. This means that you should apply them carefully. Yes, we do need fences, but do keep in mind that using them will reduce the ability for reordering and improving the code you write.&lt;/p&gt;  &lt;p&gt;By now, I guess that we’ve covered most of the theory around fences. You might be asking: how do I use fences in my .NET code. Good question, but we’ll leave the answer for the next post. Keep tuned for more on multithreading.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697685" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/luisabreu/archive/tags/Multithreading/default.aspx">Multithreading</category></item><item><title>Administrar registros de rendimiento</title><link>http://msmvps.com/blogs/juansa/archive/2009/07/03/administrar-registros-de-rendimiento.aspx</link><pubDate>Fri, 03 Jul 2009 10:31:48 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697668</guid><dc:creator>juansa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Tanto Las Alertas y registros de rendimiento como Logman nos permiten cierta flexibilidad en la recogida de estadísticas de rendimiento. La herramienta &lt;strong&gt;&lt;em&gt;Relog (relog.exe)&lt;/em&gt;&lt;/strong&gt; es una herramienta de línea de comandos que nos permite administrar los registros de contador que hemos creado. Con Relog podemos llevar a cabo las siguientes tareas:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Combinar múltiples registros de contador en un único archivo de registro. Podemos listar los nombres de archivo de todos los contadores que queremos que Relog procese separadamente, o podemos usar caracteres comodín (como *) para identificarlos. Los registros que combinemos pueden contener contadores de un sólo equipo o de varios. &lt;/li&gt;    &lt;li&gt;Crear resúmenes de archivos de salida desde un archivo o archivos de entrada. &lt;/li&gt;    &lt;li&gt;Editar el contenido de un registro contador, permitiendo saltar los contadores por nombre o todos aquéllos que no han recogido datos durante un intervalo de tiempo determinado. &lt;/li&gt;    &lt;li&gt;Convertir datos de contador de un formato a otro. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Nota: &lt;/strong&gt;Logman puede recoger datos de rendimiento en múltiples equipos y guardarlos en un sólo archivo de registro. Sin embargo, esto puede resultar en una cantidad de tráfico considerable e indeseado. Relog nos permite monitorizar el rendimiento localmente, y entonces recuperar los datos según se necesiten. Colocando los comando de Relog en un archivo de lotes, los datos pueden recuperarse de forma programada, en momentos que el tráfico de la red es bajo.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;La herramienta Relog&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Relog necesita dos parámetros: la ruta de un archivo existente (de entrada) y la ruta para un archivo (de salida) nuevo(parámetro –&lt;strong&gt;o&lt;/strong&gt;).&lt;/p&gt;  &lt;p class="CodeBlock"&gt;&lt;em&gt;&lt;strong&gt;relog&lt;/strong&gt; C:\archivodeentrada.blg &lt;strong&gt;–o&lt;/strong&gt; C:\archivonuevodesalida.blg&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Relog reune datos desde uno o más registros de rendimiento y los combina en un archivo de salida único. Podemos especificar un archivo de entrada único o una cadena de archivos de entrada.&lt;/p&gt;  &lt;p class="CodeBlock"&gt;&lt;strong&gt;relog &lt;/strong&gt;C:\archivodeentrada.blg c:\archivodeentrada2.blg c:\archivodeentrada3.blg –&lt;strong&gt;o &lt;/strong&gt;c:\archivonuevodesalida.blg&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sintaxis&lt;/strong&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="1132"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="172"&gt;         &lt;p align="center"&gt;&lt;em&gt;&lt;strong&gt;Parámetro&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="241"&gt;         &lt;p align="center"&gt;&lt;em&gt;&lt;strong&gt;Sintaxis&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="317"&gt;         &lt;p align="center"&gt;&lt;em&gt;&lt;strong&gt;Función&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="401"&gt;         &lt;p align="center"&gt;&lt;em&gt;&lt;strong&gt;Notas&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Archivo configuración&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-config &lt;/strong&gt;archivo&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Usa los parámetros definidos en este archivo.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Usar –&lt;strong&gt;i&lt;/strong&gt; en el archivo de configuración como emplazamiento para una lista de archivos de entrada.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Contadores&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;strong&gt;&lt;em&gt;-c&lt;/em&gt; &lt;/strong&gt;&lt;em&gt;{ruta [ruta …]&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Especifica los contadores del archivo de entrada que queremos escribir en el archivo de salida. Si no se especifican, se escribirán todos.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Usar –&lt;strong&gt;cf&lt;/strong&gt; &lt;em&gt;archivo &lt;/em&gt;para valores de contador de un archivo existente.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Resumen intervalo&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-t &lt;/strong&gt;n&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Escribir la salida cada &lt;em&gt;n &lt;/em&gt;intervalo de los archivos de entrada.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Predeterminado para crear salidas cada intervalo de entrada.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Nombre archivo de salida&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-o &lt;/strong&gt;{ruta|DSN!RegistroContador}&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Especifica el archivo de salida.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Obligatorio.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Formato archivo registro&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-f &lt;/strong&gt;bin | bincirc |csv | tsv| SQL&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Elección del formato del archivo de salida.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Predeterminado formato binario.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Añadir&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;strong&gt;&lt;em&gt;-a&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Añade la salida desde la sesión de registro a un archivo existente.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;Sólo para archivos binarios de entrada y salida.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Comenzar Relogging&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-b &lt;/strong&gt;M/D/YYYY H:MM:SS [{AM|PM}]&lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Especifica la fecha y la hora de inicio del archivo de salida.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="172"&gt;Finalizar Relogging&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;em&gt;&lt;strong&gt;-e&lt;/strong&gt; &lt;em&gt;M/D/YYYY H:MM:SS [{AM|PM}]&lt;/em&gt; &lt;/em&gt;&lt;/td&gt;        &lt;td valign="top" width="317"&gt;Especifica la fecha y la hora de fin del archivo de salida.&lt;/td&gt;        &lt;td valign="top" width="401"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697668" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/juansa/archive/tags/Herramientas/default.aspx">Herramientas</category><category domain="http://msmvps.com/blogs/juansa/archive/tags/Windows+Server/default.aspx">Windows Server</category></item><item><title>Revista de Pragmatic Programmer</title><link>http://msmvps.com/blogs/lopez/archive/2009/07/03/revista-de-pragmatic-programmer.aspx</link><pubDate>Fri, 03 Jul 2009 09:53:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697663</guid><dc:creator>lopez</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;img style="display:inline;margin-left:0px;margin-right:0px;" src="http://www.todocontenidos.com/images/articles/pragpub.png" align="left" alt="" /&gt; Ayer, gracias a un tweet de @chillicoder, me enteré de la aparición del primer número de la revista de la gente de Pragmatic Programmer:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.pragprog.com/magazines" href="http://www.pragprog.com/magazines"&gt;http://www.pragprog.com/magazines&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Les recomiendo bajarse la edición actual, de Julio. Yo la bajé desde esa página en formato PDF, pero también está disponible para otros formatos (notablemente, para Kindle). Esta edición no tiene desperdicio.&lt;/p&gt;  &lt;p&gt;Encuentro una editorial y artículo de Michael Swaine, un buen reencuentro con este autor, que debo estar leyendo desde que escribía en la Dr. Dobb’s.&lt;/p&gt;  &lt;p&gt;Leo un artículo donde explican su posición para poner a disposición este material, sin restricciones, y sobre cómo lo producen, en formato PDF (usando &lt;a href="http://www.lowagie.com/iText/" target="_blank"&gt;iText&lt;/a&gt;). Cada artículo tiene enlaces al final, sobre los temas y productos mencionados. Es bueno ver cómo uno de los primeros artículos explica cómo producen la propia revista y otros materiales. Es parte de lo ágil: explicar, dejar algo, que sirva para que las buenas prácticas o cosas aprendidas, puedan difundirse más allá del equipo que lo usa.&lt;/p&gt;  &lt;p&gt;Hay un artículo de Andy Lester (programador desde hace 20 años, visitar su blog &lt;a title="http://www.theworkinggeek.com/" href="http://www.theworkinggeek.com/"&gt;http://www.theworkinggeek.com/&lt;/a&gt;), sobre “The layoffs are coming”, donde explica tips para conseguir trabajo, o mantenerse en el mismo. En un mundo cambiante y en crisis, vemos que también el programador americano promedio se ve afectado.&lt;/p&gt;  &lt;p&gt;Michael Swaine entrevista a Rick Hickey (que creó Clojure, un dialecto muy popular de Lisp, que corre sobre la máquina virtual de Java, que por alguna extraña razón, es más popular que &lt;a href="http://code.google.com/p/ajlisp/" target="_blank"&gt;AjLisp&lt;/a&gt;… :-). Un artículo sin desperdicio, que tengo que leer en detalle. Pueden visitar &lt;a title="http://clojure.org/" href="http://clojure.org/"&gt;http://clojure.org/&lt;/a&gt; y he coleccionado enlaces que me parecieron interesantes en &lt;a href="http://delicious.com/ajlopez/clojure"&gt;http://delicious.com/ajlopez/clojure&lt;/a&gt;. (bueno, vería también &lt;a href="http://delicious.com/ajlopez/lisp"&gt;http://delicious.com/ajlopez/lisp&lt;/a&gt; y &lt;a href="http://delicious.com/ajlopez/functionalprogramming"&gt;http://delicious.com/ajlopez/functionalprogramming&lt;/a&gt; si están aburridos un fin de semana…. :-). Esta misma revista incluye un artículo técnico sobre Clojure, sobre su manejo de exceptions.&lt;/p&gt;  &lt;p&gt;El bueno de Dave Thomas es entrevistado por Swaine, sobre el proceso de publicación de los libros y revistas, y el mercado de libros electrónicos. Son temas importantes: qué va a pasar con el libro impreso? Hay cambios, y Thomas explica su visión.&lt;/p&gt;  &lt;p&gt;Hay un artículo de autor John Shade, sobre Microsoft, Google, y Wolfram Alpha, cómo es la pelea por la arena de los buscadores. Finalmente, hay un calendario de eventos que vienen (me temo que algo centrado en eventos de EE.UU.)&lt;/p&gt;  &lt;p&gt;Y si alguien todavía no lo conoce, les recomiendo la visita a todo el sitio&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pragprog.com"&gt;http://www.pragprog.com&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;y los blogs de Andy Hunt &lt;a title="http://andy.pragprog.com/" href="http://andy.pragprog.com/"&gt;http://andy.pragprog.com/&lt;/a&gt; y Dave Thomas &lt;a title="http://pragdave.pragprog.com/" href="http://pragdave.pragprog.com/"&gt;http://pragdave.pragprog.com/&lt;/a&gt;. Tienen videos y podcast, yo prefiero lo escrito: &lt;a title="http://www.pragprog.com/articles" href="http://www.pragprog.com/articles"&gt;http://www.pragprog.com/articles&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Nos leemos!&lt;/p&gt;  &lt;p&gt;Angel “Java” Lopez   &lt;br /&gt;&lt;a href="http://www.ajlopez.com"&gt;http://www.ajlopez.com&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/ajlopez"&gt;http://twitter.com/ajlopez&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697663" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/lopez/archive/tags/Desarrollo+de+Software/default.aspx">Desarrollo de Software</category><category domain="http://msmvps.com/blogs/lopez/archive/tags/Programaci_26002300_243_3B00_n+Funcional/default.aspx">Programaci&amp;#243;n Funcional</category><category domain="http://msmvps.com/blogs/lopez/archive/tags/Desarrollo+Agil/default.aspx">Desarrollo Agil</category></item><item><title>OpsMgr: Petite astuce pour faire fonctionner les notifications par script</title><link>http://msmvps.com/blogs/opsmgr/archive/2009/07/03/opsmgr-petite-astuce-pour-faire-fonctionner-les-notifications-par-script.aspx</link><pubDate>Fri, 03 Jul 2009 07:22:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697648</guid><dc:creator>Yann Gainche</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Lors de la d&amp;eacute;finition d&amp;#39;une notification par script avec Operations Manager, on utilise souvent des variables XPATH qui sont ajout&amp;eacute;es en param&amp;egrave;tres du script. Par exemple, on peut utiliser la syntaxe suivante pour envoyer la notification vers un fichier&amp;nbsp;: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Full Path to File&lt;/strong&gt; : %SystemRoot%\System32\cmd.exe&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Command Line Parameter&lt;/strong&gt; : /C Echo $Data/Context/DataItem/ManagedEntityDisplayName$ $Data/Context/DataItem/ManagedEntityPath$ $Data/Context/DataItem/AlertName$ $Data/Context/DataItem/AlertDescription$&lt;/p&gt;
&lt;p&gt;Le premier probl&amp;egrave;me de cette syntaxe est que le contenu des variables peut inclure des espaces qui seront consid&amp;eacute;r&amp;eacute;s comme des s&amp;eacute;parateurs ou d&amp;#39;autres caract&amp;egrave;res (&amp;lt;&amp;gt;|) qui peuvent &amp;ecirc;tre intercept&amp;eacute;s par l&amp;#39;interpr&amp;eacute;teur de commande. Il convient donc de mettre les variables entre guillemets : &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Full Path to File&lt;/strong&gt; : %SystemRoot%\System32\cmd.exe&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Command Line Parameter&lt;/strong&gt; : /C Echo &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/ManagedEntityDisplayName$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/ManagedEntityPath$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/AlertName$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/AlertDescription$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Le second probl&amp;egrave;me est que, pour certaines alertes, des variables peuvent &amp;ecirc;tre vides. Dans ce cas, cela provoque une erreur et interrompt la notification. Il faut donc indiquer, pour chaque variable pouvant &amp;ecirc;tre vide, une valeur par d&amp;eacute;faut :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Full Path to File&lt;/strong&gt; : %SystemRoot%\System32\cmd.exe&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Command Line Parameter&lt;/strong&gt; : /C Echo &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;[Default=&amp;#39;No Name&amp;#39;]&lt;/span&gt;&lt;/strong&gt;/Context/DataItem/ManagedEntityDisplayName$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/ManagedEntityPath$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data/Context/DataItem/AlertName$&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;quot; &amp;quot;&lt;/strong&gt;&lt;/span&gt;$Data&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;[Default=&amp;#39;No Description&amp;#39;]&lt;/span&gt;&lt;/strong&gt;/Context/DataItem/AlertDescription$&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697648" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/opsmgr/archive/tags/OpsMgr+2007/default.aspx">OpsMgr 2007</category></item><item><title>Volatile and local</title><link>http://msmvps.com/blogs/senthil/archive/2009/07/03/volatile-and-local.aspx</link><pubDate>Fri, 03 Jul 2009 05:16:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697644</guid><dc:creator>Senthil</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you’ve done any multithreading programming at all, you must be aware of the &lt;a title="http://msdn.microsoft.com/en-us/library/x13ttww7(VS.80).aspx" href="http://msdn.microsoft.com/en-us/library/x13ttww7(VS.80).aspx"&gt;volatile&lt;/a&gt; modifier. When a field is marked volatile, it tells &lt;/p&gt;  &lt;p&gt;1. the JIT compiler that it can’t hoist the field because it may be modified by multiple threads &lt;/p&gt;  &lt;p&gt;2. the CLR that the field must be read to and written from with &lt;a title="http://www.bluebytesoftware.com/blog/2008/06/13/VolatileReadsAndWritesAndTimeliness.aspx" href="http://www.bluebytesoftware.com/blog/2008/06/13/VolatileReadsAndWritesAndTimeliness.aspx"&gt;acquire and release semantics&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Given what you’ve read above, the post’s title doesn’t make sense. A local variable, by definition, cannot be accessed from multiple threads. An object referred to by a local variable can be shared among threads, but never the variable itself.&lt;/p&gt;  &lt;p&gt;Well, that was true as long as local variables remained just that – local variables. The 2.0 release of C# brought closures to the language, and C# implements capturing of local variables by making them members of a generated class. Now do you see the problem?&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  1: &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Main()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  3:     &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; stopRunning = false;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  4: 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  5:     Thread t = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Thread(() =&amp;gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  6:         {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  7:             &lt;span style="color:#0000ff;"&gt;while&lt;/span&gt; (!stopRunning)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  8:                 Console.WriteLine(&amp;quot;&lt;span style="color:#8b0000;"&gt;Hello&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  9:         });
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; 10:     t.Start();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; 11:     DoSomethingElse();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; 12:     stopRunning = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; 13: }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Nothing out of the ordinary here – I’m creating a thread, passing a lambda to the &lt;font color="#800000"&gt;Thread&lt;/font&gt; constructor, and capturing &lt;font color="#800040"&gt;stopRunning&lt;/font&gt; inside the lambda.&lt;/p&gt;

&lt;p&gt;This code isn’t correct though – for the reasons mentioned in the initial paragraph of this post, &lt;font color="#800040"&gt;stopRunning&lt;/font&gt; needs to be declared with the volatile modifier. Unfortunately, you can’t make &lt;font color="#800040"&gt;stopRunning&lt;/font&gt; volatile – the compiler complains that local variables cannot be marked volatile.&lt;/p&gt;

&lt;p&gt;Oops. &lt;/p&gt;

&lt;p&gt;Making &lt;font color="#800040"&gt;stopRunning&lt;/font&gt; a member of the class will solve the immediate problem – you can then mark the field volatile, and all is good. However, left at that, it now makes the class non-threadsafe – two threads could call &lt;font color="#800040"&gt;Main&lt;/font&gt;, and &lt;font color="#800040"&gt;stopRunning&lt;/font&gt; will be shared between them. &lt;/p&gt;

&lt;p&gt;I guess this is the price to pay for compiler magic – magic that enables seamless access to local variables from anonymous methods.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697644" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/senthil/archive/tags/C_2300_+3.0/default.aspx">C# 3.0</category><category domain="http://msmvps.com/blogs/senthil/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>XML Literals: Creating an XML File</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/02/xml-literals-creating-an-xml-file.aspx</link><pubDate>Fri, 03 Jul 2009 00:36:31 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697623</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;One of my favorite features in VB 9 (Visual Studio 2008) is XML Literals. This example demonstrates how insanely easy it is to build an XML file using VB.&lt;/p&gt;  &lt;p&gt;This code builds xml from a list of customers.&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;Dim customerXml As XElement = _      &lt;br /&gt;&lt;/font&gt;&lt;font color="#65402e" face="Consolas"&gt;&amp;lt;customers&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;%= From c In custList _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Select &amp;lt;customer&amp;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;lt;LastName&amp;gt;&amp;lt;%= c.LastName %&amp;gt;&amp;lt;/LastName&amp;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;lt;FirstName&amp;gt;&amp;lt;%= c.FirstName %&amp;gt;&amp;lt;/FirstName&amp;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;lt;/customer&amp;gt; %&amp;gt;       &lt;br /&gt;&amp;lt;/customers&amp;gt;       &lt;br /&gt;customerXml.Save(&amp;quot;customers.xml&amp;quot;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This code starts with the customers root node. It then builds a customer node for each customer found in the list.&lt;/p&gt;  &lt;p&gt;NOTE: The definition of the Customer class and the list of customers (custList) used in the above example can be found &lt;a href="http://msmvps.com/blogs/deborahk/archive/2009/07/03/generics-building-a-list-of-customers.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The resulting XML:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&amp;lt;customers&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;customer&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LastName&amp;gt;Baggins&amp;lt;/LastName&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FirstName&amp;gt;Billbo&amp;lt;/FirstName&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;/customer&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;customer&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LastName&amp;gt;Baggins&amp;lt;/LastName&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FirstName&amp;gt;Frodo&amp;lt;/FirstName&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;/customer&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;customer&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;LastName&amp;gt;Kurata&amp;lt;/LastName&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FirstName&amp;gt;Deborah&amp;lt;/FirstName&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;/customer&amp;gt;       &lt;br /&gt;&amp;lt;/customers&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697623" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/Xml/default.aspx">Xml</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Lambda Expressions: Finding Differences in Two Lists</title><link>http://msmvps.com/blogs/deborahk/archive/2009/07/02/lambda-expressions-finding-differences-in-two-lists.aspx</link><pubDate>Fri, 03 Jul 2009 00:19:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697622</guid><dc:creator>Deborah Kurata</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;One of my favorite features in .NET 3.5 is lambda expressions. This example demonstrates how to use lambda expressions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;To compare items in two lists and find which items in one list are not in the other. For example: {1, 2, 3}, {2, 3, 4}. {1} is only in the first list. &lt;/li&gt;    &lt;li&gt;To display the contents of the resulting set. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;First, define two lists:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;List&amp;lt;int&amp;gt; list1 = new List&amp;lt;int&amp;gt;() { 1, 6, 8 };      &lt;br /&gt;List&amp;lt;int&amp;gt; list2 = new List&amp;lt;int&amp;gt;() { 2, 6 };&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;The following lambda expression finds all of the items that are only in the first list:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="cons"&gt;Func&amp;lt;IEnumerable&amp;lt;int&amp;gt;&amp;gt; exceptionFunction = () =&amp;gt; list1.Except(list2);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This is a Func delegate which returns an IEnumerable&amp;lt;int&amp;gt;. There are no arguments passed into the function, hence the empty parenthesis (). The =&amp;gt; is the lambda operator. The remaining code uses the Except method of the list to find the items not in the second list.&lt;/p&gt;  &lt;p&gt;The following lambda expression displays the resulting items:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="cons"&gt;Action displayList =      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; () =&amp;gt; exceptionFunction().ToList().ForEach(i =&amp;gt; Debug.WriteLine(i));&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This one is an Action delegate that takes no parameters. It first takes the IEnumerable result from the exceptionFunction, converts it to a list, then writes each item to the Debug window.&lt;/p&gt;  &lt;p&gt;Call the displayList method to try this out:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;displayList(); // Result 1,8&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Calling displayList calls exceptionFunction which operates on the two lists. This will display 1 and 8 to the Debug window.&lt;/p&gt;  &lt;p&gt;You can then change the list and see the new results:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;list2 = new List&amp;lt;int&amp;gt;() { 1, 4 };      &lt;br /&gt;displayList();&amp;#160; // Result = 6, 8&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Since the code in the lambda expressions is not executed until it is called, this call to displayList recognizes the current values of the lists. So you get new results.&lt;/p&gt;  &lt;p&gt;You can change the other list and see the new results:&lt;/p&gt;  &lt;p&gt;&lt;font color="#65402e" face="Consolas"&gt;list1 = new List&amp;lt;int&amp;gt;() { 3, 4, 9 };      &lt;br /&gt;displayList();&amp;#160; // Result = 3, 9&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697622" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/deborahk/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/CSharp/default.aspx">CSharp</category><category domain="http://msmvps.com/blogs/deborahk/archive/tags/Lambda/default.aspx">Lambda</category></item><item><title>Google has screwed up yet again</title><link>http://msmvps.com/blogs/access/archive/2009/07/02/google-has-screwed-up-yet-again.aspx</link><pubDate>Fri, 03 Jul 2009 00:10:56 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697620</guid><dc:creator>Tony</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;So I go to do my favourite technical question search method which involves searching just the microsoft.public.access newsgroups and it totally fails.&amp;nbsp; Worked just fine a few days ago.&lt;/p&gt; &lt;p&gt;Start at &lt;a href="http://groups.google.com/" target="_blank"&gt;groups.google.com&lt;/a&gt; and enter your search term.&amp;nbsp; For example &amp;quot;access books vba&amp;quot; but without the double quotes.&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;p&gt;Now if you just click on Search Groups you get many, many useless, duplicate hits.&amp;nbsp;&amp;nbsp; The problem is that there are many web sites out there mirroring the NNTP Usenet and Microsoft newsgroups.&amp;nbsp;&amp;nbsp; All so they can sell Google advertising.&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I should note that there are a few genuine online forums such as Utter Access and, think, the Access World forums.&amp;nbsp;&amp;nbsp; However the vast majority are bottom feeding, scum suckers whose only interest is advertising revenue.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So as to limit the search just to the Microsoft newsgroups I would then click on Advanced Search go down to the Group name field and enter microsoft.public.access.*&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;p&gt;And that doesn&amp;#39;t find any hits.&amp;nbsp; I *KNOW* a few days ago this worked just fine.&amp;nbsp; &lt;/p&gt; &lt;p&gt;So Google has screwed up the NNTP newsgroup search interface yet again.&amp;nbsp;&amp;nbsp;&amp;nbsp; Ahh, for the good old days of dejanews.com and deja.com.&amp;nbsp;&amp;nbsp;&amp;nbsp; They did only one thing and did it well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697620" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/access/archive/tags/Google+Complaints/default.aspx">Google Complaints</category></item><item><title>Renewed as an MVP</title><link>http://msmvps.com/blogs/bmains/archive/2009/07/02/renewed-as-an-mvp.aspx</link><pubDate>Thu, 02 Jul 2009 23:53:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697618</guid><dc:creator>bmains</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;nbsp;found out yesterday that I was renewed as a Microsoft MVP for another&amp;nbsp;year!&amp;nbsp; I look forward to tweeting, blogging, and&amp;nbsp;writing about Microsoft .NET technologies.&amp;nbsp;&amp;nbsp;You can connect to me with the following:&lt;/p&gt;
&lt;p&gt;Twitter: @brianmains&lt;br /&gt;Linked In: &lt;a href="http://www.linkedin.com/in/brianmains"&gt;http://www.linkedin.com/in/brianmains&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697618" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bmains/archive/tags/General+Announcements/default.aspx">General Announcements</category></item><item><title>What Data Access Model Do You Use For Your App?  Take This Poll!</title><link>http://msmvps.com/blogs/bmains/archive/2009/07/02/what-data-access-model-do-you-use-for-your-app-take-this-poll.aspx</link><pubDate>Thu, 02 Jul 2009 23:50:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697617</guid><dc:creator>bmains</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I created a TWTPOLL for this very question.&amp;nbsp; Please submit your opinion:&amp;nbsp; &lt;a href="http://twtpoll.com/2oqm0o"&gt;http://twtpoll.com/2oqm0o&lt;/a&gt;.&amp;nbsp; Thanks for your participation in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697617" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/bmains/archive/tags/Poll/default.aspx">Poll</category></item></channel></rss>