<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Leaning Into Windows</title><subtitle type="html">Kathleen Dollard&amp;#39;s view of life and .NET development</subtitle><id>http://msmvps.com/blogs/kathleen/atom.aspx</id><link rel="alternate" type="text/html" href="http://msmvps.com/blogs/kathleen/default.aspx" /><link rel="self" type="application/atom+xml" href="http://msmvps.com/blogs/kathleen/atom.aspx" /><generator uri="http://communityserver.org" version="4.0.30619.63">Community Server</generator><updated>2008-03-13T11:49:44Z</updated><entry><title>IASAConnections/ArchitectConnections</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/09/23/iasaconnections-architectconnections.aspx" /><id>/blogs/kathleen/archive/2008/09/23/iasaconnections-architectconnections.aspx</id><published>2008-09-23T18:41:38Z</published><updated>2008-09-23T18:41:38Z</updated><content type="html">&lt;p&gt;Next month I’m speaking at ArchitectConnections in San Francisco. This is going to be the most amazing event – a combination of the best of IASA with the best of us way geeky, in the trenches architects. IASA is the International Association of Software Architects (pronounced eye-sa). I’m part of the Denver chapter, and combining IASAConnections and ArchitectConnections means there will be the most amazing collection of people (your conference fee covers it all). It looks like a near historic collision of perspectives across a tremendous range of focus – with Paul Preiss and IASA there to help sort it all out. Imagine throwing Scott Ambler, David Chappelle, David Platt, Allan Holub, Juval Lowy, Rocky Lhotka, Michelle LaRoux-Bustamante and Neil Roodyn into the same place. Stir gently and bake – who knows what’s going to come out. You can check this out on the speaker’s roster at &lt;a href="http://www.iasaconnections.com/"&gt;www.iasaconnections.com&lt;/a&gt;. &lt;p&gt;The speaker’s roster is the reason you should consider this conference come. I’m absolutely in awe about speaking on the same stage as some of these folks.  &lt;p&gt;But wait, wait, there’s more.  &lt;p&gt;This conference is in San Francisco – fun and easy to get to. It’s also the first run so the attendance is likely to be reasonable – with up close and personal experiences with these great speakers. And, I just heard a rumor from the speaker coordinator that the food will be great.  &lt;p&gt;But wait, wait, there’s more.  &lt;p&gt;As a speaker, I’ve gotten info on a significant discount. Rather than just whispering this to a few friends, I’m putting it out here. You can get $400 off the regular conference registration fee! Do that by clicking this &lt;a href="http://www.iasaconnections.com/shows/iasa2008fall/registration.asp?s=119"&gt;link&lt;/a&gt;. When you register on line scroll to the bottom and enter the discount code “SPEAKER”. The discount should appear on the next confirmation page so you can ensure you’ve got your discount before you commit.  &lt;p&gt;And there’s even more… &lt;p&gt;Until they run out, I’ll give you a collapsible VB Frisbee if you find me (I’m not going to be hard to find) and say you came because of this blog post! &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648691" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>Firing up VB.NET for the First Time</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/09/15/firing-up-vb-net-for-the-first-time.aspx" /><id>/blogs/kathleen/archive/2008/09/15/firing-up-vb-net-for-the-first-time.aspx</id><published>2008-09-15T15:08:23Z</published><updated>2008-09-15T15:08:23Z</updated><content type="html">&lt;p&gt;Over the last couple of weeks I&amp;#39;ve had the delightful experience of conversing with one of my heroes - Bruce McKinney who wrote Hardcore Visual Basic. Bruce has been off doing other things - not programming. So from my narrow perspective, it&amp;#39;s a bit like talking to he&amp;#39;s been in a time capsule. I asked him to let me share this unique and very different perspective on VB.NET:&lt;/p&gt; &lt;p&gt;--------------------------------&lt;/p&gt; &lt;p&gt;&lt;em&gt;I hadn’t even thought about VB or any other computer language for years when a woman named Kathleen Dollard sent me an email out of the blue asking if I was the same Bruce McKinney who wrote a certain book. Well, yes, I did write a certain book about a certain language back in a different lifetime. I started a conversation with Ms. Dollard (who turned out to be some sort of VB.NET guru) and during that conversation I idly asked how VB.NET had turned out. I had written a short analysis of VB.NET in its beta stage (see &lt;/em&gt;&lt;a href="http://vb.mvps.org/hardweb/vbnet.htm"&gt;&lt;em&gt;http://vb.mvps.org/hardweb/vbnet.htm&lt;/em&gt;&lt;/a&gt;&lt;em&gt;), but I never saw the finished product, much less the current version of what should by now be a mature language. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Well, one thing led to another (as it had in the past and as I had promised it never would again). I discovered what I assumed was a crippled toy version of VB.NET called Visual Basic Express Edition. Why not download it and at least look through the language syntax to figure out what happened? Well, anybody reading this probably knows that VB Express is one of the largest toys in history. It didn’t take long to realize that I had probably made a mistake. &lt;/em&gt; &lt;p&gt;&lt;em&gt;The first thing I discovered is how bad the help and the help engine are. It&amp;#39;s a mess of incompleteness and broken links—even worse than the execrable help in VB6. During setup I made the mistake of saying I wanted help first on my disk rather than online. The result was total confusion with all sorts of languages mixed up with incomplete topics. Everything seems related to VB6, and some of it is completely wrong about VB6, and its differences from VB 2008. You&amp;#39;d think after ten years most VB.NET programmers would be new people who wouldn&amp;#39;t know or care about VB6, but the internal help seems oriented to people who skipped all those earlier versions and are just now converting from VB6. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Finally I got online to an MSDN site that summarized all the language features. It wasn&amp;#39;t great, but way beyond what came with the program. I worked for five or six years in Microsoft language documentation before I went into development and then to Microsoft Press. We had less training and education than documenters have today, but we did a much better job. Are there no good technical writers left? Is MSDN paying three times as much as the VB team to get the few semi-competent ones? It was depressing. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Once I finally found documentation, I had some surprises. First I checked everything I criticized in the beta and sure enough the mistakes were all still there. They really did cripple arrays. They really did put AddressOf in the Delegate syntax even though it&amp;#39;s a lie. They really did change While/Wend to While/End While instead of killing it. They really did change the Property syntax for no reason other than to break code. They really did remove Imp and Eqv without adding Shl and Shr. Fortunately, they restored Static, which some idiots had removed from the beta. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Now I know these are really small things in the big picture, but languages are about symbolism and metaphor. If you don&amp;#39;t understand the importance of metaphor you shouldn&amp;#39;t be designing languages. And if you&amp;#39;re going to clean house and change everything, why not kill Dim? If they had just added Local, they could have left Dim in place for compatibility, but no thoughtful coder would ever use it in new code. But no on the VB team seems to understand the purpose of compatibility or deprecated features. &lt;/em&gt; &lt;p&gt;&lt;em&gt;The thing that bugs me the most is the crippled arrays. In VB6 (as in all real high-level languages) you can declare any array bounds you want. For example, assume I wanted an array of temperatures within a reasonable range so that I could record how many times each temperature was reached. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Const iMinTemp As Integer = -50, iMaxTemp As Integer = 125&lt;/em&gt; &lt;p&gt;&lt;em&gt;Dim aTemp(iMinTemp To iMaxTemp) As Integer&lt;/em&gt; &lt;p&gt;&lt;em&gt;aTemp(iTodayTemp) += 1&lt;/em&gt; &lt;p&gt;&lt;em&gt;That’s how I’d do it in VB6 (or Pascal or any other civilized high level language), but that’s not possible in VB.NET (or C# or Java or any of the other pretenders). Instead I’d do something like: &lt;/em&gt; &lt;p&gt;&lt;em&gt;Dim iOffsetTemp = 0 - iMinTemp&lt;/em&gt; &lt;p&gt;&lt;em&gt;Dim aTemp(0 To iMaxTemp - iMinTemp) As Integer&lt;/em&gt; &lt;p&gt;&lt;em&gt;aTemp(iTodayTemp + iOffsetTemp) += 1&lt;/em&gt; &lt;p&gt;&lt;em&gt;I have to do all the stupid bookkeeping (with all the risk of an off-by-one error) every time I use the array even though that’s the sort of thoughtless bookkeeping high level languages are supposed to take care of. Every time I used one of these brain-dead arrays it would make me angry that someone had deliberately crippled our language. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Well, enough about old complaints. I also found some surprising new stuff such as += and -=. I didn&amp;#39;t expect that. It&amp;#39;s hardly in the Basic tradition, but I always appreciated those operators in C. They also added signed integers. Kemeny and Kurtz didn&amp;#39;t just forget about signed integers. They left them out on purpose and bragged about their absence as a feature. I&amp;#39;m sure signed integers are there for interoperability, which shouldn&amp;#39;t be a Basic goal and wasn&amp;#39;t needed, not even to call signed arguments in the library. &lt;/em&gt; &lt;p&gt;&lt;em&gt;How about operator overloading? That was a surprise. Does overloading work nice and easy in VB? Or is it loaded with gotchas as in C++? Generics look simple enough, and it would be nice to have them built into the language without the weird side effect of the C++ preprocessor. I had a great time building generic C++ classes for VB safearrays (now gone). I hope generics in VB are as much fun as in C++, but less confusing. &lt;/em&gt; &lt;p&gt;&lt;em&gt;But enough philosophizing. Let&amp;#39;s write some code. I start out by trying File New Project. Interesting choices. I have not the slightest idea what a WPF Application might be (and when I check help I see I don&amp;#39;t want to know), but I can guess what a Windows Form Application might be. So I try it. There&amp;#39;s my form. Once again VB guesses that I want to call my form variable Form1 and that the caption on it should be &amp;quot;Form1&amp;quot;. Just as wrong and evil as in VB1. You&amp;#39;d think by now they&amp;#39;d have learned not to encourage bad habits. OK, I want to put a button on this form, but there are no buttons. I play around for three minutes before I figure out how the toolbox slides over. Cool. &lt;/em&gt; &lt;p&gt;&lt;em&gt;I put a button on the form. It comes out as Button1 rather than Command1. A step forward. It takes me a minute to figure out how to change the variable name to something sensible--btn. I add a label named lbl. When I remove the text from this label it disappears. Something funny is going on in the properties, so I examine the list. There are some properties I&amp;#39;ve never seen. I put the cursor on an unfamiliar one and press F1. It tells me what a property list is, but nothing about any particular property. Hmmm. Finally I figure out how to turn off AutoSize and make the label 3-D. &lt;/em&gt; &lt;p&gt;&lt;em&gt;I click on the button and insert lbl.text = &amp;quot;Hello, world&amp;quot; in the btn event procedure. I run it and it works. But when I click it again nothing appears to happen because it’s overwriting the same message. I need the text to change. I go back to the event procedure and type Static c As Integer = 1. Ahhhh! What a luxury! What I would have given to do that back in VB5. I started begging for this in VB4. I go to the bottom of the procedure and type c += 1. I&amp;#39;m still not sure I like this, but I do it anyway. Then I think what if VB has... Naw, it couldn&amp;#39;t be. I try c++, and what a relief. It doesn&amp;#39;t work. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Then I go back up and change the label assignment to lbl.text = &amp;quot;Hello, world &amp;quot; + c. I get an InvalidCastException. So, VB is not so loose anymore with type conversions. “Evil Type Coercion” must be gone. This is a good thing. How about &amp;quot;Hello, world &amp;quot; + CStr(c). This works. But then I think: This is an object oriented language. An integer variable ought to have conversion methods. So I remove the CStr and type a dot after c. All the methods appear including ToString. Wow! lbl.Text = &amp;quot;Hello, world &amp;quot; + c.ToString. Yes! When I run it, the text counts every time I click. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Not quite like old times, but it has its moments. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Then I remember something interesting from the File New Dialog. Could I really write a console application in Visual Basic? I try it and there&amp;#39;s the Sub Main() followed by End Sub with a cursor sitting in the middle. It looks more like my first C program than my first BASICA program, but it&amp;#39;s obvious what to put in between. I type Print &amp;quot;Hello, World&amp;quot;. VB encloses my string in parentheses. Is the syntax difference between a Sub and a Function really gone? When I press Run, it starts a console, but then fails and tells me an InvalidCastException was handled. A syntax diagram tells me that print takes a file number followed by a ParamArray Output(). OK, we&amp;#39;re not in Kansas anymore. &lt;/em&gt; &lt;p&gt;&lt;em&gt;This isn&amp;#39;t enough information, so I move the cursor to Print and press F1. Information Not Found. No help on Print? I look in the help index. No Print statement. There is an entry for Print # statement, but that takes me to a table of changes from VB6. I find Print # in this table and click on a topic called Print and PrintLine. Information Not Found. &lt;/em&gt; &lt;p&gt;&lt;em&gt;After messing around for a while and seeing more Information Not Founds, I figure out that I may be on the completely wrong track. It appears that maybe writing text is done through the FileSystem. Instead of Print, I try My.Computer.FileSystem.WriteAllText(&amp;quot;Hello, World&amp;quot;). This fails because it needs three arguments, the first a file name. Maybe there is a standard string for the console such as &amp;quot;CON&amp;quot; or &amp;quot;SCRN&amp;quot;. I think this worked in some version of C file I/O. After some experimenting, I try arguments WriteAllText(&amp;quot;scrn&amp;quot;, &amp;quot;Hello, world&amp;quot;, True). This is valid and runs, but doesn&amp;#39;t print in a console. Probably somewhere on my disk is a file called &amp;quot;scrn&amp;quot; containing the words &amp;quot;Hello, world&amp;quot;. I search and sure enough, there it is in a semi-random directory. &lt;/em&gt; &lt;p&gt;&lt;em&gt;I put my cursor on WriteAllText and press F1. Information Not Found. I mess around for a while longer and find a link to a help topic on console applications. Information Not Found. Do I really want to be a VB programmer? Information Not Found. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Now it happens that at the moment my home internet connection is broken so I have to go to work to get online, but I&amp;#39;m doing this at home. I could probably figure this out if I could get to MSDN. But there&amp;#39;s no excuse for installing a broken help system on something called VB Express Edition that takes more than an hour to install. Sure enough, when I get back to the internet, the solution is simple, although I never did find it in VB help or MSDN. I googled &amp;quot;VB.NET console sample&amp;quot; and found the information on a non-Microsoft web site. I just need Console.WriteLine(&amp;quot;Hello, world). &lt;/em&gt; &lt;p&gt;&lt;em&gt;There are some good things here, but overall I think I better get this damn thing off my computer before I get really mad. Or hooked. &lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1647831" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>In Praise of Nested Classes</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/09/05/in-praise-of-nested-classes.aspx" /><id>/blogs/kathleen/archive/2008/09/05/in-praise-of-nested-classes.aspx</id><published>2008-09-05T16:21:48Z</published><updated>2008-09-05T16:21:48Z</updated><content type="html">&lt;p&gt;I love nested classes. You can do elegant thing wit them that otherwise require a ton of code - even if its generated. But the rest of the world seems confused by the syntax. Assuming a class named Budget, we could have Budget.List refer to a class (not an instance).  &lt;p&gt;&amp;nbsp; &lt;p&gt;Public Class Budget&lt;br /&gt;&amp;nbsp; &amp;#39; Other Stuff&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp; Public Class List&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Stuff&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Class &lt;/p&gt; &lt;p&gt;End Class &lt;p&gt;&amp;nbsp; &lt;p&gt;Unfortunately, the rest of the world is either confused by them, hasn&amp;#39;t been introduced, or is following the Microsoft party line that they are uncool as expressed via FxCop. So to a large extent this post is a requiem. I have decided not to do what I&amp;#39;m describing here in my current architecture. At least today.  &lt;p&gt;Since I think it is such a huge loss, I want to show you what nested classes can accomplish. Imagine an architecture tat contains these classes (with other meaningful stuff deleted): &lt;p&gt;&amp;nbsp; &lt;p&gt;Public MustInherit Class BizEntityBase(Of TEntity As EntityBase(Of TEntity))&lt;br /&gt;End Class &lt;p&gt;Public Class Budget&lt;br /&gt;&amp;nbsp;&amp;nbsp; Inherits BizEntityBase(Of Budget)  &lt;p&gt;End Class &lt;p&gt;Public Class BudgetList&lt;br /&gt;&amp;nbsp;&amp;nbsp; Inherits BizListBase(Of Budget)  &lt;p&gt;&amp;nbsp;&amp;nbsp; Protected Sub New(ByVal list As IEnumerable(Of Budget))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New(list)&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Sub  &lt;p&gt;&amp;nbsp;&amp;nbsp; Public Function GetItem(ByVal id As Guid) As Budget&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim q = From entity In Me Where entity.BudgetGuid = id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return q.SingleOrDefault&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Function  &lt;p&gt;&amp;nbsp;&amp;nbsp; Public Shared Function GetList() As BudgetList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return GetListInternal(Of BudgetList)()&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Function  &lt;p&gt;End Class &lt;p&gt;In this scenario, you have a copy for BudgetList for every single entity - probably hundreds adding many thousands of lines of code. Sure you can generate it, but it&amp;#39;s better to reuse code than generate it. Now, use a nested class:&lt;/p&gt; &lt;p&gt;Public MustInherit Class BizEntityBase(Of TEntity As BizEntityBase(Of TEntity))&lt;br /&gt; &lt;blockquote&gt; &lt;p&gt;Public Class List&lt;br /&gt;&amp;nbsp;&amp;nbsp; Inherits BizListBase(Of TEntity)  &lt;p&gt;&amp;nbsp;&amp;nbsp; Protected Sub New(ByVal list As IEnumerable(Of TEntity))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New(list)&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Sub  &lt;p&gt;&amp;nbsp;&amp;nbsp; Public Function GetItem(ByVal id As Guid) As TEntity&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim q = From entity In Me Where entity.PrimaryKeyValue = id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return q.SingleOrDefault&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Function  &lt;p&gt;&amp;nbsp;&amp;nbsp; Public Shared Function GetList() As EntityBase(Of TEntity).List&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return GetListInternal(Of EntityBase(Of TEntity).List)()&lt;br /&gt;&amp;nbsp;&amp;nbsp; End Function&lt;br /&gt;End Class &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;End Class  &lt;p&gt;Public Class Budget&lt;br /&gt;&amp;nbsp;&amp;nbsp; Inherits BizEntityBase(Of Budget)  &lt;p&gt;End Class&lt;/p&gt; &lt;p&gt;As a result of this change, there is ONE location for the List functionality reused by all classes. There is no BudgetList class to be generated or handcrafted.It&amp;#39;s not needed. &lt;/p&gt; &lt;p&gt;But external code must use Budget.List to access the class. I asked a smart structural architect know about this. He didn&amp;#39;t even grok the question until I explained it. So for now, I&amp;#39;m skipping this approach at the same time I&amp;#39;m throwing it out there for other people to gnaw on. &lt;/p&gt; &lt;p&gt;Although I&amp;#39;m not completely skipping it. The entity list classes I&amp;#39;m writing derive and leverage base class code so are less lines than I&amp;#39;m showing above. But it&amp;#39;s still hundreds of extra classes I see as existing only because as an industry we&amp;#39;ve yet to wrap our heads around this concept. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1646902" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>How is VB.NET Doing?</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/09/03/how-is-vb-net-doing.aspx" /><id>/blogs/kathleen/archive/2008/09/03/how-is-vb-net-doing.aspx</id><published>2008-09-03T21:18:56Z</published><updated>2008-09-03T21:18:56Z</updated><content type="html">&lt;p&gt;I recently touched base with someone from the good old VB6 days. They were good old days, but I’m not going to talk about them. He asked where VB.NET went, and it set off this weird thinking about how to explain VB.NET to someone that had dropped out and was only peripherally interested. I thought I’d share this, but many of you will want to skip. &lt;p&gt;&lt;b&gt;&lt;i&gt;&amp;quot;How is VB.NET doing? … never saw the final product, much less what it has grown into now.&amp;quot;&lt;/i&gt;&lt;/b&gt; &lt;p&gt;I suppose grown is the operative word here. It’s huge. No, bigger. And I don’t mean the size of the market or its respect. I just mean the libraries. And it’s not really about libraries anymore because Microsoft’s releases all things in relation to .NET – even the Xbox. Not via API’s or some other approach, but more libraries. So the size reflects the complexity of nearly every platform initiative Microsoft has come up with.  &lt;p&gt;The rate of growth is still increasing. We have around 15 “modern” data access strategies and 18 (user) interface strategies. I don’t have my slide handy, but four or five of the data access strategy and a few of the interface strategies released in the last year. You could be spend all your time trying keeping up and you wouldn’t.  &lt;p&gt;As a result the interactions with .NET are quite different. There were a large handful of people that knew just about everything there was to know about VB6 and before. Not everything, because it’s asymptotic, but close enough to touch. Now a handful of people are experts in a single area – anyone, like me, who covers more than one topic stays acutely aware of what we don’t know. No one is competent anymore in the sense we would have used that term ten years ago. This makes the personal experience profoundly different – instead of sailing, it feels like running Class IV whitewater, and Class VI if you’re actually doing stuff with a company on the line. Uptake is slow; even of generics three years old with a clear payback.  &lt;p&gt;And the people. That’s a sad side. There used to be programmers who were hobbyist. I’ve been slammed for using that word – but this is a person who’s not a full time coder but passionate about coding. It’s not a job, it’s a joy. The grip from LA, the pet store owner from Arcata, the Canadian speechwriter, the dozens and dozens of people that knew about a niche ad weren’t afraid to dive in and do it. I loved those people; they made the tapestry so rich around us. They’re gone. Just gone. I propped up my brother as one of the last standing hobbyist coder until the last few weeks when he had a chance to give up and merge with an existing group. I feel his relief that he’ll play music and see his wife.  &lt;p&gt;Folks would like to tap that old VB market, a lot of people recognize how many strong midsize companies exist today because of what someone started in their basement with VB or Access or FoxPro. But this will be a new tool, not VB. It might run VB as a language, but just like VB lassoed the complexity of C++ as a language, we now need something to lasso the complexity of platforms. It’s a new level we need. I think we have everything we need to build it, we just can’t quite (almost) tell what it should look like. &lt;p&gt;But as the hobbyist side of the rich tapestry withered, another surprising one wove itself. Microsoft itself changed entirely at the level that mattered. Remember when people were afraid to talk to you and even knowing you were on an NDA was a secret? Well that’s gone. People blog and they are excited and I’ve even had managers say “my job is to be sure my people are excited every day when they come to work.” Softies caring if softies in general are happy. I can feel a bit old hanging around there because they are so young – but I can also feel the energy and brilliance and the teamwork –even if there are still a few thousand teams. A bunch of softies are my friends now – heck I got my last piercing with a softie on tour.  &lt;p&gt;There are more women than ten years ago, but it’s hardly balanced. There’s the Brian joke. A few years ago at PDC or TechEd there were more men named Brian speaking than women. But there are a large handful of us and I think we get respect for our accomplishments. I think we need to start way down the pipeline helping women know how fabulous, fun and exciting it is to be a software developer. &lt;p&gt;You would not recognize the MVP program. Gates, Balmer, Ozzie, all the superstars come and speak to us in a vast convention center. Yeah, I know you think I’m kidding. It’s something to put on your business card and Microsoft works to tell people who we are. I share my MVP lead with only a few hundred other MVPs and my last lead turned into a good friend. To those of us that were MVPs when no one knew who we were, it’s weird. I almost cried the first time I saw a “Welcome MVPs” banner on a campus building. It makes it harder to convince younger MVPs what Karl first told me “If you ever do anything to stay in the program, you don’t understand the program.” But we still have a feisty bunch giving the team hell in order to make VB.NET better as fast as we can. Yep, we’ve got daily communications with the team and yep, the listen. Or, well, sometimes anyway.  &lt;p&gt;We’re currently coping with legacy .NET apps. When you start with a clean slate, you skip them for a while, but they are back now and we need strategies for piecewise improvements. Between that, the competence across technologies issue, and the sheer size of what we accomplish is driving me to the concept of human scale architecture or block based architecture as a current passion. .NET apps are rarely as small as 100 KLOC. At least not ones I see or hear about. They are generally gigantic, so the monolithic thing is a disaster. But so is the 3-tier/n-tier stuff. It’s just not enough, so we’ve been through this web-services arabesque. Good ideas, and really important to some scenarios, but just shifting around the deck chairs in others. It makes me think of Spirograph. The picture keeps looking different, but we seem to keep coming back around.  &lt;p&gt;So, this is a lot of words not to answer a simple question. I’ve hardly mentioned VB and I guess that’s the biggest change. VB hardly matters. I mean a lot of us like it and it’s a really cool language, but most of what I can do in VB I can do in C# in nearly the same way. There is more difference within either language in any two adjacent versions than there are between the two languages. Languages are evolving pretty quickly. VB.NET has a nice OOP model, generics, lambda expressions, SQL-ish statements checked by the compiler, embedded (compiler checked) XML, the ability to automatically create help files for our libraries, an absolute ton of awesome toys.  &lt;p&gt;Microsoft publishes numbers that there are more people in VB.NET than C#, but the rest of us can’t figure out what planet their using for the statistics. C# is common in my clients and the majority of my audiences. So I learned C# and am comfortably bilingual. VB.NET is hanging in there. It’s not what it was – but the world is most definitely not what it was either. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1646663" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>A Good Day</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/08/23/a-good-day.aspx" /><id>/blogs/kathleen/archive/2008/08/23/a-good-day.aspx</id><published>2008-08-24T00:48:21Z</published><updated>2008-08-24T00:48:21Z</updated><content type="html">&lt;p&gt;This isn’t a technical post, and far more “chick-a-dee” than usual for my blog. So skip it if the idea of multiple shades of “off-white” freaks you out.  &lt;p&gt;A good day – shopping.  &lt;p&gt;I hate to shop, I mean the normal way in the store I feel rushed, annoyed, fat, broke, and ripped off. An entire store built to make me believe I want to be someone and something that would never appeal to me in the absence of dishonest lighting and piped in music. All wiped clean of fingerprints marking the karma of evil within the pipeline of the stuff piled in our department stores. Shopping like that is just not my thing.  &lt;p&gt;But at the UU church garage sale – now that’s different. It’s all for a good cause and Unitarians have &lt;em&gt;cool&lt;/em&gt; crap!  &lt;p&gt;I found a designer jacket that’s beautiful, knit and totally packable. Reversible if I remove the designer label. And a pretty patterned one. And a black jacket. And a button sweater when I need that matronly look. And a soft as the world cotton turquoise jacket. And all are wash and wear (I hate the chemistry and smell of cleaners).  &lt;p&gt;Then I found a sweater. The kind of knit in pattern that I generally don’t wear – but this one I swear has my puppy and her sisters. Really. I mean really. And on the front, my pup sitting next to a boot. Not the kind of boot I’d wear but clearly the “I want to go to the mountains, mommy” look on the face. I need to listen to that look way more often for my own peace of mind. Oh and today it’s a grocery bag for 5$.  &lt;p&gt;Wow.  &lt;p&gt;And a fabulous wool jacket in my nieces size, and two sport coats my son might be able to use at Cambridge. And a designer necklace that matches the cotton jacket. And Luka Blum and Tom Adler CDs.  &lt;p&gt;Wow. Now, you’d think I would stop there. Of course you would. I would think so.  &lt;p&gt;But on the way in I’d passed a set of theatre seats. You know the plywood back plush seat 1930+ style. Wow. What do I need with theatre seats? Who in a normal suburban house needs theater seats? Not even the fancy stadium seats, but just normal seats. And they can sort of use recovering. Of course all the time I’m looking at clothes, I’m trying to figure out what I can do with theatre seats because they are just drop dead, freezer burn cool.  &lt;p&gt;So I keep wandering and find a 14” embroidery hoop. Of course I don’t embroider, my eyes passed that point years ago and I’ll stick with hobbies where I don’t need glasses. BUT, they make the greatest earring racks, and if I get another I can buy more earrings on my travels - round racks of earrings by the bed as dream catchers.  &lt;p&gt;And I’ve been planning to redo my family photo place and the mixed grouping up cheap frames aren’t going to look so hot. I find an entire box of brand new soapstone frames for $5.  &lt;p&gt;But then there’s still the theatre seats. What can I do with theatre seats?  &lt;p&gt;Suddenly I see them replacing the butt ugly bench in my breakfast nook that my dad and I have been going to replace for 3 years. Oh, man this is going to be so totally freakin’ cool.  &lt;p&gt;So, I check. Yes, four seats in two pairs and the back and bench to a fifth are $40 total. Except it’s half price day. So I take the ticket to go buy them for $20. And you think that this seems like plenty of good luck for one day, right? You think I’d be done with it, right?  &lt;p&gt;Then I see my children’s step mom who is also a friend of mine. She says. “Yeah, &lt;i&gt;and I have the van to take them home&lt;/i&gt;.” Right. I had forgotten the little I need to get them home thing and she’s just right there. No need to fire up the transporter beam or my gas guzzling ¾ ton.  &lt;p&gt;And you’re thinking “Enough already!”  &lt;p&gt;So, I follow her home and happily she misses the stupid moped that crosses just in front of her. By ourselves we are able to unload the theatre seats. No need to annoy the men we share, who are at a movie anyway, perhaps seeing Dark Knight for the third or fourth time.  &lt;p&gt;I think now about going to the circle of hell I’ve set aside for myself when I buy things from China (if you don’t get that, you aren’t paying attention). So I think. Hmm. Those frames are surely from China. Nope, India so I don’t go to that particular hell this week (probably to a few others).  &lt;p&gt;And you know that off white upholstery that in the sun was just a “had to go” kind of thing. It matches my cabinets in the kitchen/breakfast room. And I knew from the get-go that I’d have to raise them. I found cedar 4x4’s to do that in the garage.  &lt;p&gt;I don’t know how it gets much better than this. Finding more crap is certainly not better. Finding just the right amount of crap that fits into my life as it is today, and packable for whatever stage I wander off to next – now that’s a good day.  &lt;p&gt;The only adjustment I’ll make is a donation in the plate next time I’m in church. I am feeling more than a wee tad guilty that I walked with all this stuff for $36.  &lt;p&gt;In the meantime, tonight, right now, riding on all this luck, I’ll go for a walk and buy a lottery ticket. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1645627" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>Interfacing with Insanity</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/08/22/interfacing-with-insanity.aspx" /><id>/blogs/kathleen/archive/2008/08/22/interfacing-with-insanity.aspx</id><published>2008-08-22T15:28:34Z</published><updated>2008-08-22T15:28:34Z</updated><content type="html">&lt;p&gt;More and more we are becoming mutual support groups for the insanity around us, which also happen to write business apps on the side. &lt;p&gt;I set out a few weeks ago to intertwine a tall strong intelligent business object with a confident and independent business object. Seemed the perfect pairing.  &lt;p&gt;While I can’t buy POCO and other things being responsible for common behaviors of business objects, I do have a deep appreciation for provider and injection patterns. It seems fine that the business object is self servicing – meaning it has a “save yourself” method, as long as it is passing the work off to someone else who can be switched out to match development, deployment and evolutionary needs.  &lt;p&gt;This was a rite of passage for the common pattern I fall back on in business objects. I’ve had insight seeing people struggle to keep their UI and business layers clean. When we mound heaps of fabulous features into base classes it’s exceedingly difficult to keep the logical intent we start with – keeping the business logic and UI isolated. I’ve just lost faith that we can avoid using features that are sitting in the Intellisense drop down. I want the compiler in control of controlling me.  &lt;p&gt;That means every layer has to talk to every other layer via an interface and providers. That means the business object starts with nothing but it’s own properties and three or four self-servicing methods. It has a base class that defines any further bases, and nothing in the base classes is protected. All, private.  &lt;p&gt;That’s the theory. It was way more work than I expected to implement this against CSLA business objects, but it worked. The “way more work” part was partially because I accomplished two other things along the way. Please don’t get distracted about the fact I was using CSLA as a base. If you understand where I’m going here, it makes absolutely no difference. The interesting thing to talk about later is the interfaces. I’m quite happy with that outcome. &lt;p&gt;Then I dived into what I thought would be easy – the business collections. Items for budget, line items for invoices, etc. I spent an entire day thinking, ditzing, tinkering and got nowhere. Hmmm. What’s the root cause? It’s the fact I was trained as a scientist. When there seems to be something more going on – most likely there is more going on.  &lt;p&gt;CSLA – and again, it makes no differences what implementation layer you have – I just want to use a good one and not write it from scratch – does a good job setting up bindable collections. But at what cost! I scribed out all the interfaces in play (many are in play multiple times so the order is a bit random. I’m including them below, but the punch line is Rocky implements 13 custom interfaces and 12 BCL interfaces with a total of 92 members. There are a few things in Rocky’s implementation having to do with n-tier deployment that you could potentially argue, but this is just what needs to be implemented to accomplish data binding. &lt;p&gt;That’s 92 things that are either directly available to the business collection or are available via interfaces. The interfaces are the killer – everything in any interface – all 92 members are potentially public. At the moment I’m primarily interested in isolating the programmer writing business logic – but all 92 interface members are available to the UI.  &lt;p&gt;This isn’t a problem if we abandon the idea of independent business objects. Wow – NO WONDER WE DON’T DO A GOOD JOB OF INDEPENDENT BUSINESS OBJECTS.  &lt;p&gt;Today, I’m just screaming. And walking. And maybe later drinking. Some place in this I’ll decide a solution for this client today. I’m still hoping to do a simple list, with a “AsBindingList” method for binding and a CSLA provider for persistence. But man does that look hard at the moment.  &lt;p&gt;&amp;nbsp; &lt;h3&gt;CSLA Interfaces&lt;/h3&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IEditableBusinessObject &lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; int EditLevelAdded { get; set;}&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void DeleteChild();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void SetParent(IParent parent)&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void Delete();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IBusinessObject&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;ISupportUndo&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void BeginEdit();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void CancelEdit();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void ApplyEdit();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IUndoableObject&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; int EditLevel { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void CopyState(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void UndoChanges(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void AcceptChanges(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;ITrackStatus&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsValid { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsSelfValid { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsDirty { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsSelfDirty { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsDeleted { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsNew { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool IsSavable { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IUndoableObject&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; int EditLevel { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void CopyState(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void UndoChanges(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void AcceptChanges(int parentEditLevel, bool parentBindingEdit);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;ISavable&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; object Save();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void SaveComplete(object newObject);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; event EventHandler&amp;lt;SavedEventArgs&amp;gt; Saved;&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IParent&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void RemoveChild(Core.IEditableBusinessObject child);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void ApplyEditChild(Core.IEditableBusinessObject child);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IDataPortalTarget&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void MarkAsChild();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void MarkNew();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void MarkOld();&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void Child_OnDataPortalInvoke(DataPortalEventArgs e);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void Child_OnDataPortalInvokeComplete(DataPortalEventArgs e);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; void Child_OnDataPortalException(DataPortalEventArgs e, Exception ex);&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IIndexSearchable&amp;lt;T&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;IEnumerable&amp;lt;T&amp;gt; &lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; SearchByBLOCKED EXPRESSION;&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;System.ComponentModel.IRaiseItemChangedEvents&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp; bool RaisesItemChangedEvents { get; }&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;12 interfaces&lt;/font&gt; &lt;p&gt;&lt;font face="Lucida Console"&gt;49 members&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1645513" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>Customer Service - Saga #1</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/08/16/customer-service-saga-1.aspx" /><id>/blogs/kathleen/archive/2008/08/16/customer-service-saga-1.aspx</id><published>2008-08-16T21:17:55Z</published><updated>2008-08-16T21:17:55Z</updated><content type="html">&lt;h3&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="4"&gt;UPDATE Aug. 26, 2008: My sister received a replacement computer from Lenovo yesterday. While this was initially handled very badly by Lenovo sales and the support people initially appeared to have their hands tied, in the end Mark and Lakeysha made it right - within 6 business days of when the problem was reported. That&amp;#39;s not too far from what you expect, and not bad considering that it first descended into chaos. The contact point appeared to be her post in the support forums. Moral of the story - if you&amp;#39;re right dealing with someone, don&amp;#39;t quit. I&amp;#39;m happy enough with the outcome that I ordered a very sweet Lenovo T400 last night. &lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/h3&gt; &lt;h3&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="4"&gt;UPDATE Aug. 18, 2008: My sister posted a link to this story in the customer service forums at Lenovo. As you can see in the comments, she got in contact with Mark at Lenovo and then another person via phone. It appears this will be resolved, and I will post an update when we get to the end of the story.&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/h3&gt;&lt;em&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt; &lt;p&gt;It amazes me when people ignore customer service. Nothing hurts a company more than bad rep on customer service. I have two stories. How two companies you may never have heard of - Jax Outdoor Gear (Fort Collins) and Chaco Sandals (Paonia, Colorado) went above and beyond in service twice in three weeks. The second is how Lenovo of legendary customer service just screwed my sister refusing to replace a brand new laptop that arrived dead in a timely manner. They told her she’ll have to wait six days for them to even tell her what they will do and she needs to teach with this in ten days. Needless to say that Lenovo T400 I was about to buy is not looking nearly as sweet as the Sony Vaio.  &lt;p&gt;Let’s do the icky stuff first – Jax and Chaco deserve their own post.  &lt;p&gt;My sister tells her story with Lenovo better than I would:  &lt;p&gt;&lt;i&gt;August 16&lt;sup&gt;th&lt;/sup&gt;, 2008&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;I received my first ever laptop on Wed, Aug 13&lt;sup&gt;th&lt;/sup&gt; but didn’t have time to take it out of the box to get it going until this morning. That is when the fun began. When I started it up, the screen acted weird – little tracer lines coming off to the right of the words as it started up. When the regular background screen w/ icons came up, all the text was ghosted and really hard to read. In my ignorance, I thought perhaps the battery was in too low a state of charge and once it got charged up the screen would self correct (I had it hooked up to AC at the time). After dinking with resolution and appearance settings for a while to no avail, I decided there was a problem and called Lenovo Tech Support and that is where this surreal odyssey began. Note that I didn’t begin my log until about the third phone call, so the first few times are approximate.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;8:00 am – Tech Support (1-877-453-6686). I spoke with a very helpful person in Tec Support who informed me that since it was a “brand new out of the box machine” I needed to call Sales. They gave me the number to call.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;8:10 am – Sales (1-866-428-4465) I spent a few minutes on waiting to get to speak to a human. After explaining my problem to them, they informed me that I needed to call Tech Support…. I explained that Tech Support had just sent me to them and they explained that I needed a case #.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;8:20am – Tech Support (1-877-453-6686). No waiting and a very helpful guy said yes I can get you a case # and dutifully gave me case #WN033531. I thought I was getting warm….HAH!&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;8:35 am - Sales (1-866-428-4465). Spent a few more minutes waiting to get a human. After I gave case # the person at the other end said he would need to put me on hold for “3 to 7 minutes”. Twenty minutes later he came back and tells me I need to call Tech Support because there are no notes on the case #. I inquired about just shipping the machine back to them for a credit and was told I would have to pay a 15% restocking charge. I am pretty sure I yelled at this point something like “I have to pay you guys $150 to take back a machine that doesn’t work!”.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;9:10 am - Tech Support (1-877-453-6686). Kelly (I was starting to take names at this point). She was quite helpful and apologetic and made an offer that I thought was “we’ll send you a rebuilt one from here if you send us the broken one” – I later found out I had misunderstood her. I stated that I had spent $1000 for a “new” machine and expected to have a functioning – and new – machine. She “put in lots of notes” on my case number and said that should get me set up with Sales. I listened to her type for quite a while. She sent me off with what we thought would be sufficient info to get the problem resolved at Sales.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;9:15 am - Sales (1-866-428-4465). Got right in this time. The person at the other end brought up my case number and then said that he would have to put me on hold for “2 minutes”. A few minutes later he came back and said he would figure out what I needed to do and call me back. I inquired about how long I would have to wait and he said “within an hour”.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;9:45 – Sales called me back. The rep on the other end stated that he had spoken to a Michael Shefield in Tech Support and that there “was no such case number”. Needless to say, I blew up at this point. When I asked him to confirm the number of the folks he spoke to (1-877-453-6686) he said that “wasn’t the right number”. I pointed out that indeed I had spoken to Tech Support already several times this morning at that number. He seemed confused and offered to conference call with Tech Support. What he actually did was transfer me to Tech Support to a very helpful guy named Fredrick/Fred.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;10:00am – Tech Support (transfer from Sales). Fred offered to send a box to return ship the damaged machine and they would fix it (this is apparently the offer that Kelly was trying to make earlier but I didn’t understand that they would just fix my machine and send me back the same one - not a used or rebuilt one). However, Fred wanted to figure out how to make it clear that I didn’t cause the damage – it came out of the box that way. So he put me on hold for a few minutes. He came back and very apologetically said that he wanted to try Sales one more time….. He did offer to conference call with me to make sure I got taken care of. &lt;/i&gt; &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;10:10 am – Tech Support (Fred) and Sales (Farros) – Fred conferenced us in to Sales. This took a few more minutes of hold music….The first question I got from Farros in Sales was “had I talked to Tech Support?”. Since I had Fred right there on the line, I was able to clear that up quickly enough. He asked to put us on hold for “1 to 2 minutes”. Fred dutifully stayed on hold with me for what turned out to be more like 10 minutes. While on hold, Fred &amp;amp; I even bonded a little joking about the bad classical music and how they had little stutters in the music to taunt you that someone might actually be coming back on the line. We joked about whether this was a bad Saturday Night Live skit or a Twilight Zone episode. I asked him if “Sales” was just a company in India hired to not send machines to customers and he said “I don’t know”… and then stuttered “wait - I mean I am sure they weren’t hired for that, but I don’t know who they are”. &lt;/i&gt; &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;10:25am - Tech Support (Fred) and Sales (Farros) – Farros finally came back from hold and offered to let me return it without a restocking charge and then they would forward me on to Sales and they would let me reorder a new machine. It was starting to sound promising. Farros put us on hold for a few more minutes and connected me to a woman in Sales. He explained to her what he had said he was going to do (return, reorder) and we thought we were on our way. She explained how she was going to send a return authorization label via email and I could ship it UPS. The label would allow for free shipping. At this point Fred left because it looked as though everything was in order. The woman put me on hold again for just a few minutes but came back apologizing that she had given me bad information. The new plan was that they were going to file a damage claim with UPS and that would take four business days. I was livid. I pointed out that they could get denied from UPS and that after four business days I would be right back where I started. She said “we would not do that”. I am not holding my breath.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;So here I sit with a dead computer and no resolution after almost three hours on the phone. I was bounced back and forth eight times between Tech Support (apparently onshore somewhere with what seems to be helpful folks who have limited options to help me) and Sales (apparently offshore somewhere staffed with folks that talk to their supervisors for everything and give a different answer every time they come back off hold). I can tell you when I was given the option of what the resolution would be after they filed a claim with UPS I emphatically said refund vs. replace computer. Frankly I will never give another dime to a company who thinks this joke of a system can be called “support”.&lt;/i&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt; &lt;p&gt;&lt;i&gt;Stay tuned I may have a few more chapters to write…&lt;/i&gt;  &lt;p&gt;NOTE: Like most PC’s this came double boxed. Because of a dent in the outside box, they unwrapped it at UPS and determined that the inside Lenovo box was in perfect shape. This is NOT a shipping problem and if it was it’s a problem between Lenovo and UPS, and should not be affecting my sister. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1644848" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>We Don't Publish Words, We Publish Ideas - Get Over It</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/08/01/we-don-t-publish-words-we-publish-ideas-get-over-it.aspx" /><id>/blogs/kathleen/archive/2008/08/01/we-don-t-publish-words-we-publish-ideas-get-over-it.aspx</id><published>2008-08-01T21:01:01Z</published><updated>2008-08-01T21:01:01Z</updated><content type="html">&lt;p&gt;This is about writing, not .NET so if that is all you care about, you can stop reading.  &lt;p&gt;I just received a compliment from my editor that I’m easy to work with on review. I realize this is a process many people don’t understand. I’ve worked with some great editors (including Patrick Meader at Visual Studio Magazine), so I thought I’d take a minute to explain the process. If you hope to write this is likely to help you, and if you already write you might have to apologize to an editor. Regardless you might learn something. &lt;p&gt;Now, I’m assuming you have a good editor. Honest to goodness, I had an editor once insert into my piece “now that we’ve got the bun let’s look at the meat” and yes it was much closer to the “where’s the meat” ads on TV than we are now. As you can guess, I blew my top and didn’t work with that editor again. I wish him well in his creative endeavors; my article just wasn’t his creative endeavor.  &lt;p&gt;Few editors are like that. Almost all editors are good. If you want to write, I think Stephen King’s book “On Writing” is worth a read. King says “the editor is always right.” This is really hard for writers to hear and believe, so let’s back up and look at the process I’ve experienced, and then explain what I think King’s comment means. &lt;p&gt;For a magazine, I write an article and submit it. The editor sits on it for up to six weeks because his schedule is at least as demanding as mine. He edits it, sometimes in crises mode, and sends it back to me shortly before the issue goes to layout. Now, every editor in the world is going to say “I try not to do that” but reality is reality. Once I get the editors changes for my review, I need to turn them around in a very short period of time, generally less than 72 hours, occasionally less than 24. &lt;p&gt;What I get back is a Word document with a lot of red ink – I think my editor’s review is set to blue which is slightly less depressing. Remember, I write about 15 articles a year that are edited by the same person and about 1/4 of what I see is mark up. That’s a lot of red ink. You’re job is to write a great technical article. The editor’s job is to supply proper grammar and consistent voice to a magazine. All that red ink is the editor doing their job to make &lt;i&gt;you&lt;/i&gt; look good.  &lt;p&gt;&lt;i&gt;Here’s what really important:&lt;/i&gt; The editor is always correct that he made a change, but NOT always correct in the change he made. It is a huge mistake to just say “yeah, go with it.” The editor’s main job is to find problems – their job is NOT to solve problems in &lt;i&gt;&lt;strong&gt;your&lt;/strong&gt; &lt;/i&gt;article. The easiest way for the editor to communicate the problem is to offer an alternative. Nine times out ten, well at least eight times out of ten, their fix is good. I’m terrible about “backing into sentences” although I’ve finally gotten better about passive voice. I’m very careless with tense and everyone struggles with ambiguity in “it,” “this,” etc. This the majority of fixes – along with formatting details specific to the magazine that you’re unlikely to ever care a lot about (Listing references are in parentheses, for example). &lt;p&gt;It’s your job to read the article review and look at every change the editor made. That means you turn on Final With Markup and turn it off when you need to ensure the final flow. You should have a mechanism for asking questions like “why did you change this” for the purpose of learning, but rarely for the purpose of this article. Discussions for resolution of this particular article are almost never worthwhile. If the editor thinks your way is wrong, and you think the editor’s way is wrong, there is always a third way, a fourth way, or a fifth way. It’s your idea, rephrase it to make it more clear.  &lt;p&gt;If you look at a particular spot of red ink that you hate, you’re first question should be “what was I trying to say?” This generally points directly to a better way of saying it. It should never be about whether what you wrote was correct. It’s a collaboration, not a contest. What you wrote may be correct, but it tripped up the editor and there’s a better way to say it. Occasionally, ask so you learn for the next article – for this one, just fix it. You have Track Changes on and can change what you need to. Do not accept or reject anything, just change it again. If you really believe you have to say it the initial way, find a way to prefix or postfix it for clarity, often with another sentence.  &lt;p&gt;At least a few of the edits in nearly every article of mine is because I go out on a correct, but non-critical side case or tangent (anyone who has heard me speak just giggled as it is one of my lifelong sins). This “or …” is confusing because there’s no context. If it’s important, such as a landmine in the process, I expand it to a full sentence or two explanation. If it’s not important I drop it.  &lt;p&gt;When you get a review, you check it make potentially a number of changes and send it back – quickly. The process is not going well if you see the article again. I hate this, but I do understand. Every time I read it I will see something else to fix. The editor and the magazine (and you) need to get the issue to press and go on. The quality of response you send back is every bit as important as the effort you put into the original article. And remember, you’re article is part of a greater whole. Things like how code is displayed, figure captioning, and page count are decisions beyond the scope of what you’re doing. Getting the article ready for initial submission is a solo effort, but within the process of placing that article into the magazine in the best possible shape - you’re a team player. &lt;p&gt;You’re role on that team cannot be replaced. I like to imagine that an editor can improve my work by x%. Let’s say they can make it 25% better. Now if it begins as pure crap, well, they will make it 25% better crap. At the same time, I’m a technical person. I never match Stephen King’s prose or Rowling’s descriptions. There’s always room for improvement. If I take an extra day to self-edit, maybe have a friend read something over, what the editor starts with is good, add 25%, and I look pretty snazzy! &lt;p&gt;With respect, this is especially an issue for writing in a language other than your native tongue, generally that means non-native English speakers writing for an English language magazine. It’s not fair, and I am a total moron who can’t even read the work I’ve had translated into other languages, so who am I to talk? But your final article will be better – remember the editor can only do x% - if you have someone else edit and you review those edits for clarity before submitting the article.  &lt;p&gt;It astounds me when I hear that people forget getting an article into a magazine is a team sport. If someone either feels protective of their words or they don’t bother to spend time in the review cycle to get things right, they are not thinking through the big picture. We don’t publish words, we publish ideas – get over the protective thing. If an editor says to me “this isn’t clear,” or “did you screw this up?” they save my butt and I totally appreciate it. They’ve found technical inconsistencies, and places my grammar was so bad I wound up saying something different than what I meant, and today even someplace where I mistyped a class name!  &lt;p&gt;What I think King meant in his comment is this: &lt;b&gt;&lt;i&gt;Editors are &lt;u&gt;not&lt;/u&gt; always right in what they suggest. But they are &lt;u&gt;always&lt;/u&gt; right in showing what needs a second look and what can probably be better. &lt;/i&gt;&lt;/b&gt; &lt;p&gt;Writing this post has me thinking about some significant mentors in regards to writing – Claude Len Bullard who helped me understand while I was still in high school that communication matters, Robert Scoble who encouraged me to write my first articles, Deborah Kurata for putting me on the other side of the fence (I tech edited her first book and no editor has ever been as hard on me as I was on her), Don Kiely who explained the process, helped me remember what it meant to be a novice, and was there for me in tough times, Bill McCarthy for sometimes going over the exact wording of a difficult point in the guts of a language or CLR (OK, and sometimes actually explaining that point to me), Dan Appleman who encouraged me to write my book and step into my own light, and Patrick Meader who has been an awesome partner through years of writing, my kids for reminding me the most important things I write may not be about .NET, and of course, my parents and the Academy. &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1643034" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>What a C# Coder Should Know Before They Write VB - Updated</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/07/25/what-a-c-coder-should-know-before-they-write-vb-updated.aspx" /><id>/blogs/kathleen/archive/2008/07/25/what-a-c-coder-should-know-before-they-write-vb-updated.aspx</id><published>2008-07-25T17:20:58Z</published><updated>2008-07-25T17:20:58Z</updated><content type="html">&lt;p&gt;I’ve repurposed this list and thus am making it a new post, linked from the previous. I realize this is long for a blog post, and that it changes too much, so I will be moving it to a page, once I rebuild my site (a great embarrassment).  &lt;p&gt;Initially I wanted a quick list of “ways to go wrong” when switching from C# to VB. As it evolved, the line blurred between common mistakes that might make you look dumb to some rather nuanced differences between C# and VB. As Eric Meijer says – VB is not C# without semi-colons. I realized that I have crossed over into details that many VB coders do not know, at least not off the top of their head. So, I’ve shifted the target a bit. These are all things that are good to know, but this list shouldn’t scare the crap out of C# coders considering VB and VB coders may want to review it for nuances. To be clear – I didn’t sit down knowing everything in this list. I had some things around casting and tying wrong, I had completely forgotten the ! operator, and I hadn’t explored generic extension methods sufficiently.  &lt;p&gt;I am sold on the concept of polyglot programming and think every C# coder should know enough VB to do Office, late binding, and XML work in VB. Assuming you keep your business logic in C#, you don’t need to know most of these details to build wrappers in VB. This list is intended for people actually building projects in VB. The framework is so core to what we do that it doesn&amp;#39;t make sense to demand one language or another. But if our crossing over in either direction it makes sense to embrace the elegance of the language you’re going to work in and to understand its nuances. &lt;p&gt;I’m not trying to restart any language wars, so don’t bother going there. I just want to ensure there is a good resource for C# coders that needed to write VB code.  &lt;p&gt;1) Get over the respect thing or quit before you start. VB is a great language.  &lt;p&gt;2) Obviously stop trying to name fields the same as properties with different casing. VB matches case to the declaration, so that’s the only place you care.  &lt;p&gt;3) You type less-characters, or perhaps the same as C#. Spend enough time in the IDE with auto-complete and Intellisense to accomplish this. I’m really sorry about the Ctl-Enter thing, but you can always use a space as VB will generally remove it if it’s wrong. (By the Ctl-Enter thing, I mean that you can&amp;#39;t just hit Enter to accept Intellisense. You must hit Ctl-Enter, or space or some other punctuation). In addition to auto-completing structures, VB will rearrange keywords in declarations if you can’t remember whether ReadOnly comes before or after the scope.  &lt;p&gt;4) VB is very good at re-indenting and re-spacing for you  &lt;p&gt;5) Switch the Intellisense tab to All. Visual Basic has a Common and an All tab for Intellisense. C# does not make this distinction so the All tab is likely to be most comfortable for a C# coder. The Common tab may leave you wondering where some method or property you need is located.  &lt;p&gt;6) Always turn Strict, Explicit and probably Infer On. Turn Compare to Binary although you can probably just ignore that and use the default. These are all set with Option statements at the top on. Actually, this is too strong. You may want to turn Explicit off to do late binding. As mentioned in #31 below, this is per partial class file so you can provide late binding to a fragment of your class.  &lt;p&gt;7) Retrain the baby finger and ask on Connect for the IDE to remove EOL semi-colons  &lt;p&gt;8) Get to know events. They are declarative with the Handles clause. Figure out that the Handles clause requires WithEvents on the variable. The common syntax for declaring events does not require the Delegate keyword:  &lt;p&gt;Event MyEvent(ByVal sender As Object, ByVal args As EventArgs)  &lt;p&gt;9) Learn how to use Snippets and download the Snippet Editor. Pay attention to abbreviations. Create the snippets you need. Learn to use the ?&amp;lt;tab&amp;gt; keystrokes to find templates.  &lt;p&gt;VB provides a large number of snippets. It can be tedious to find the ones you use often via the menu, and unlike C# snippets don&amp;#39;t show up in Intellisense. Instead, use the snippet auto-complete which you access by typing the first few characters hitting ? and &amp;lt;tab&amp;gt;. This provides access to the appropriate location in an alphabetized list of snippets. In this case, Enter, as well as Ctl-Enter and whitespace punctuation will select the snippet. For a Select Case with an enum, the snippet does not fill in the values. Also, VB&amp;#39;s snippet expansion doesn&amp;#39;t access the class name, so you&amp;#39;ll have an extra field in dependency property snippets.  &lt;p&gt;10) Take advantage of partial namespaces and aliased namespaces. Do not import classes without a good reason  &lt;p&gt;11) A VB module is roughly a C# static class, except it can be used without naming the class. There is some disagreement over whether this is good. Decide and make a standard, but understand how VB uses modules  &lt;p&gt;12) Spend an hour playing with nullables. VB’s comparisons approximate SQL Servers. C#’s comparisons follow different rules. This will especially bite you if you then cast to a Boolean calling null to go to False  &lt;p&gt;13) VB LINQ doesn’t make you include Select. Don’t use it unless you need it. These statements are equivalent because selecting the iterator variable is inferred:  &lt;p&gt;Dim kd = From s In list2&lt;br /&gt;Dim kd2 = From s In list2 Select s &lt;p&gt;If you wish to select something other than the iterator variable, you can, of course, use the Select statement to define it.  &lt;p&gt;14) VB LINQ has significantly more keywords making single expression LINQ statements possible and are particularly useful with aggregates, Take and Skip  &lt;p&gt;15) Anonymous type mutability is flexible, while anonymous types in C# are always immutable. Explore the Key keyword, and experience creating anonymous types via LINQ and without LINQ  &lt;p&gt;16) Inferred typing is as easy as in C#  &lt;p&gt;17) Spend some time in casting. TryCast is pretty much the same as “as” in C#, DirectCast performs a cast only, no conversions, even widening integers, allowed. CType does a conversion or a cast. For intrinsic types, it converts. For non-intrinsic types without an overloaded CType operator, it casts and is the same as Direct Cast. If there is an overloaded CType operator that the VB compiler can resolve, CType will use that operator. C# does not have a parallel to CType, nor really one for DirectCast, since widening conversions are performed in strict cases. The parentheses cast performs some conversions, such widening integer conversions and floating point to integers, but does not perform the string to date and string to numeric conversions of VB’s CType operator. VB’s CType operator uses banker’s rounding, while the C# parentheses conversion uses simple rounding (1.5 is rounded down in C#, up in VB and in Convert.Int32, Math.Round, etc).  &lt;p&gt;Initially this might be confusing, but the bottom line is you have the option of just using CType for most casting and conversions without really thinking about it, or to use DirectCast and explicit conversion operators if you want to be more explicit. The choice is yours.  &lt;p&gt;To be honest, I didn’t understand all the intracacies and opinions and have updated this in every version of this post so far. I decided casting and conversions deserved their own discussion (&lt;a href="http://msmvps.com/blogs/kathleen/archive/2008/07/22/casting-and-converting-in-visual-basic.aspx"&gt;here&lt;/a&gt;).  &lt;p&gt;18) Understand the difference between VB operators and methods. Explore the operators, particularly the extra work done by the CType casting operator. This work is generally good for your project and it isn’t a meaningful perf hit  &lt;p&gt;19) Explore all the methods and properties of the Microsoft.VisualBasic and make a team decision whether to use them. You do not have to use anything in this namespace and it is not required in all new framework implementations, although Microsoft will continue to include them. Your team might want to keep these familiar features.  &lt;p&gt;20) If you use the Microsoft.VisualBasic namespace, do some perf tests on the Microsoft.VIsualBasic.Collection and consider outlawing it  &lt;p&gt;21) VB uses parens for both method calls and indexes. Sorry.  &lt;p&gt;22) VB uses a single equals for both comparison and assignment. It works because we can’t assign in line. Not assigning in line is good as it enforces a common best practice.  &lt;p&gt;23) There’s a reason for VB’s oddly named AndAlso and your team will appreciate it. A VB 6 comparison is a binary comparison and not short-circuited. Short circuits are two lines and explicit in VB6. For consistency, And in VB.NET is binary. AndAlso is the logical comparison and is short circuited. This is consistent with C#’s &amp;amp; being shorter than &amp;amp;&amp;amp;. Or/OrElse parallels this.  &lt;p&gt;24) Similar, for consistency with VB6, CInt (and CLng, but not CByte) in VB returns -1. This is the only case in which False equals -1. This may be important if people are doing line by line conversions because you cannot tell in VB6 whether the intent of a comparison was logical or binary.  &lt;p&gt;25) Loops and conditionals do not have parentheses  &lt;p&gt;26) With Option Infer On, iterator types are automatically inferred. C# requires the var keyword:  &lt;p&gt;var list2 = new List&amp;lt;string&amp;gt;() { &amp;quot;Bill&amp;quot;, &amp;quot;Percy&amp;quot;, &amp;quot;Fred&amp;quot;,&amp;quot;George&amp;quot;, &amp;quot;Ron&amp;quot; };&lt;br /&gt;foreach (var k in list2)&lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp; // do something&lt;br /&gt;} &lt;p&gt;While VB infers the type more quietly:  &lt;p&gt;Dim list2 = New List(Of String)(New String() {&amp;quot;Fred&amp;quot;, &amp;quot;George&amp;quot;, &amp;quot;Bill&amp;quot;, &amp;quot;Percy&amp;quot;, &amp;quot;Ron&amp;quot;})&lt;br /&gt;For Each k0 In list2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; do something&lt;br /&gt;Next &lt;p&gt;27) Do loops have direct syntax for looping while and until. You can also exit from within a loop. From Help, the syntax for a Do loop is:  &lt;p&gt;Do { While | Until } condition&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop  &lt;p&gt;-or-  &lt;p&gt;Do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop { While | Until } condition  &lt;p&gt;This does not discuss using Continue with loops. In most cases, Continue does the same thing as C# - going to the top of the next iteration and skipping any remaining statements. However, the VB Continue specifies the type of loop so if you have a single Do and For loops nested you can proceed to the next iteration of the outer loop. This is not common. Again from Help:  &lt;p&gt;Continue { Do | For | While }  &lt;p&gt;VB allows a simple Do Loop if you need an infinite loop (such as a wait cycle):  &lt;p&gt;Do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop  &lt;p&gt;28) Check the syntax for extension methods. It follows VB’s tradition of being more explicit which will help your team make the transition. In this case, more explicit means the extension method is defined by an attribute.&amp;nbsp; &lt;p&gt;29) Get to know the With keyword. You may decide not to use it, but you should understand how to. It can significantly simplify code and because it avoids re-qualification it will also speeds up your application somewhat.  &lt;p&gt;30) Get to know the ByRef/ByVal semantics. You do not specify ref on the call, only the parameter declaration  &lt;p&gt;31) Get to know partial classes. You specify partial on only one class. Options are per partial, not per class, meaning you can have late binding in small portion of your class without binding overall  &lt;p&gt;32) Visual Basic requires a line continuation character – the underscore. While you are typing code, you may get in the habit of including this, and certainly the compiler will catch your mistakes. However, this can be a pain when rewrapping long lines of code. Consider writing a macro to help you wrap code if this annoys you.  &lt;p&gt;33) VB provides module level imports - that means you can use the same set of imports throughout your project, then add more in specific places. The default includes some I&amp;#39;d suggest removing, especially System.Collection (use only System.Collection.Generics  &lt;p&gt;34) VB has extremely powerful features in My. Explore these and how the Intellisense experience can lead coders to do the right thing. Consider adding your own My features.  &lt;p&gt;35) For WinForms code, VB has a very nice startup framework that includes things like unhandled exception that you may be doing in your C# startup routines. The VB mechanism is very strong and you probably want to use it. You can access these event from the Project Dialog  &lt;p&gt;36) The targeted framework is under advanced options in the Compile tab of Project dialog  &lt;p&gt;37) Namespaces work differently if no namespace is defined. In C# the class goes into the default namespace. In VB, the class goes into the project level namespace. If you put any namespace as the class level, its appended to the project namespace. Assuming all classes in the project are in the same namespace this is very good and flexible. However, if even one class needs to go into another namespace, you have to shift strategy and add explicit namespaces to every file.  &lt;p&gt;38) Interfaces work differently. They are always explicit in VB and you can specify scope within the same declaration for the method addressed directly through the instance. You will probably get to like this very much as it makes the intent much more clear.  &lt;p&gt;39) Hitting Enter on an Interface or Inherits statement creates or updates the required properties and methods. They are empty when created (no &amp;quot;Throw NotImplemented...&amp;quot;). They are not placed in their own region.  &lt;p&gt;40) Refactoring in the box is limited to Symbolic Rename which works well, although simplified. No preview - but who actually previews? If you want additional refactorings, download Refactor! which is free for Visual Basic users.I understand Refactor Pro removes those pesky semi-colons you accidentally typed  &lt;p&gt;41) VB has a handy &amp;quot;Go To Type Definition&amp;quot; in the right click menu. It does not have &amp;quot;Surround With&amp;quot;  &lt;p&gt;42) No iterators. If you need them, consider defining the class in C#  &lt;p&gt;43) While you rarely need to explore it, creating explicit event management code is available and very slick. Thanks Rocky for demanding this.  &lt;p&gt;44) VB XLINQ is amazing. Learn how to use XML namespaces for Intellisense, manage XML as XML regarding missing values (this took a 40 line piece of C# code to three lines in VB, how to output XML, and how to use it as a generalized text processing tool  &lt;p&gt;45) When using VB&amp;#39;s XLINQ for text processing, use lots of calls to embedded expressions rather than creating a monolithic statement as XML literals are still debugged on a per/statement level  &lt;p&gt;46) Creating optional parameters in your new classes is probably not a good idea because it isn&amp;#39;t compliant with C#. Use overloads as you would in C#. However, if you are interacting with code that has optional parameters, you can ignore that Missing constant entirely. Adds a lot of clarity.  &lt;p&gt;47) Consider using named arguments, particularly in dealing with Office. You need to learn this syntax anyway for attributes  &lt;p&gt;48) When you declare array bounds you declare the upper limit, not the length. Thus a string of four elements is Dim x(3) As String. Note that you can include the array bound in the declaration. You can put the parentheses on either the variable name or type, but you must put them on the variable name if you are specifying the upper bound.  &lt;p&gt;49) No multi-line lambdas in this version. When you need a closure, you must use a class. If you do not know how to use a class to build a closure, well, ask me and that probably deserves a blog post. VB also does not have true anonymous methods or void lambdas.  &lt;p&gt;50) Read &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=50"&gt;my column&lt;/a&gt; and &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=69"&gt;Bill McCarthy’s column&lt;/a&gt; (I assume you were already reading &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=54"&gt;Bill Wagner’s&lt;/a&gt;). That’s not flippant, we’re covering a lot of basics and overlooked issues, primarily the basics and details of new features  &lt;p&gt;51) Yes, VB does have operator overloading  &lt;p&gt;52) You do not have to repeat the declaration for new variables. Use the second syntax instead of the first:  &lt;p&gt;Dim c As Customer = NewCustomer(&amp;lt;params&amp;gt;)&lt;br /&gt;Dim c As New Customer(&amp;lt;params&amp;gt;)  &lt;p&gt;53) Nothing is not quite the same as null. Nothing is closer to C#’s use of default. If you have a reference type, default in C# is null. Thus, Nothing is the same as null when assigned to or compared with a reference type.  &lt;p&gt;54) The GetType operator in VB is roughly the same as typeof operator in C#. The TypeOf &amp;lt;variable&amp;gt; Is &amp;lt;typeName&amp;gt; is roughly the same as the is operator in C#. Is (without TypeOf) in VB is roughly the same as a == with reference types in C#. The caveat is that this forces the reference type semantics regardless of operator overloads.  &lt;p&gt;55) You can include array bounds  &lt;p&gt;56) Visual Basic has a Redim and Redim Preserve to re-dimension arrays. These can save you some code and possibilities for error, particularly when you use Redim Preserve to keep the currents content of your array.  &lt;p&gt;57) Only use Dim within a class (where you must use it). Use scope declarations in other locations such as class level variables.  &lt;p&gt;58) Visual Basic has separate operators for integer and floating point division. Integer division is \ while floating point is the traditional /. You will hurt performance if you do floating point division only to round back to an integer.  &lt;p&gt;59) Visual Basic has two operators for concatenating strings. You can use either &amp;amp; or +, which accomplish slightly different things. &amp;amp; converts both operands to string via the class’s ToString method. It will not fail with null values, and will concatenate numerics, etc. The + operator must perform type checking before the concatenation and is therefore slower than the &amp;amp; according to MSDN  &lt;p&gt;60) Do not use On Error. This is a holdover from VB6. While you can accomplish VB6-like behavior it makes for very messy and potentially slower IL, regardless of whether an exception occurs. On the other hand, if you’re desperately trying to move code into .NET, perhaps it will be a short term crutch.  &lt;p&gt;61) While it may not aid readability, if you feel compelled to include multiple statements on one line, use a colon to separate them.  &lt;p&gt;62) You can’t do in line assignments – a single equals is a comparison operator in these contexts. Similarly, you can’t increment and decrement in place. You can however use the increment and assign (+=), concatenate and assign (&amp;amp;=) and similar operators.  &lt;p&gt;63) The Default keyword defines the property that is analogous to the indexer in C#. This property must have a parameter and can be accessed without specifying the property name. The following two code fragments (where list is System.Collections.Generic.List(Of T)) are identical:  &lt;p&gt;X = list(42)&lt;br /&gt;X = list.Item(42)  &lt;p&gt;You can define default properties on your own collection classes via the Default keyword.  &lt;p&gt;64) The meaning of “anonymous delegate” is different in Visual Basic and C#. In C# it’s an inline delegate. In VB it’s basically an inferred delegate (thanks to Lucian for the fragment):  &lt;p&gt;Delegate Function D(ByVal x As Integer) As Integer&lt;br /&gt;Dim f = Function(x As Integer) x + 1&lt;br /&gt;Dim d1 As D = f&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Dim d2 As Func(Of Integer, Integer) = f&amp;nbsp; &lt;p&gt;65) Constraint syntax on generics is a little different, along with providing multiple constraints. The VB and C# syntax below are identical:  &lt;p&gt;Public Class SomeClass( _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Of T As New, _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V As IComparable)  &lt;p&gt;public class SomeClass&amp;lt;T, V&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where T : new() &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where V : IComparable  &lt;p&gt;and with multiple constraints:  &lt;p&gt;Public Class SomeClass( _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Of T As {BizObject, New}, _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V As IComparable)  &lt;p&gt;public class SomeClass&amp;lt;T, V&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where T : BizObject, new() &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where V : IComparable  &lt;p&gt;66) Starting in Visual Basic 9.0, VB does have ternary and default assignment operators. Ternary operators take three operands. The first must evaluate to a Boolean, and if true, the second value is returned. Otherwise the third value is returned. These are effectively equivalent:  &lt;p&gt;If(boolValue, first, second) ‘ VB  &lt;p&gt;boolValue ? first : second // C#  &lt;p&gt;It’s important to note that this differs from the older IIf function. The IIf function evaluated all argument expressions regardless of the value of the Boolean. This often defeats the purpose of the ternary operator because one of the operands is invalid based on the Boolean value:  &lt;p&gt;y = If(x Is Nothing, defaultValue, x.SomePropertyName)  &lt;p&gt;A null coalescing operator takes two values. If the first value is not null, it is used. If the first value is null, the second argument is used. Again, this is an operator, not a method, so the second expression is not evaluated unless it is needed:  &lt;p&gt;x = If(nullableInt, -1) ‘ VB  &lt;p&gt;x = nullableInt ?? -1 // C#  &lt;p&gt;67) VB does not have a collection initializer. You can, however, use the overload of List that takes an IList as input and still make the assignment on one line:  &lt;p&gt;Dim list2 = New List(Of String)(New String() {&amp;quot;Fred&amp;quot;, &amp;quot;George&amp;quot;, &amp;quot;Bill&amp;quot;, &amp;quot;Percy&amp;quot;, &amp;quot;Ron&amp;quot;})  &lt;p&gt;68) (replaced as the previous 68 fit better into #9 and I’m not going for a record here)&lt;br /&gt;When passing an out or ref argument to a function, there is no call site (as in the where you make the call) indicator for the out or ref status. The indicator is only on the declaration.  &lt;p&gt;69) Visual Basic and C# use the same operators in different ways. The help topic “Operators Compared in Different Languages” will help you find your favorite operator and avoid thinking VB doesn’t have a particular operator that’s been added in a recent version, such as bitwise operations. However, it has a number of inaccuracies that I’ve asked to be fixed in the on line version – they can’t be fixed locally for a while. These errors I see are &lt;p&gt;a) Visual Basic has a null coalescing operator starting with VB 9.0. This is NOT the old IIF function but a true coalescing operator.&lt;br /&gt;Dim x = If(y, &amp;quot;Fred&amp;quot;)&lt;br /&gt;b) Visual Basic has an exponentiation assignment operator that is missing from this list ^=&lt;br /&gt;c) The equals and not equals sign work perfectly well for strings in Visual Basic (as well as C#). You may chose to use StringComp from the Visual Basic library, but that would be unusual and it is NOT an operator. When comparisons need to be locale aware, Equals works well, and for other relationships, the System.String.Compare and CompareOrdinal work well. &lt;br /&gt;d) Logical operators for VB should include AndAlso and OrElse. When used with booleans, And and Or are boolean operators, so their inclusion is correct. And and Or are Bitwise operators when used with integers (at a bit level these are the same thing - flipping bits). AndAlso and OrElse are only used with booleans and always short circuit. &lt;br /&gt;e) The inclusion of IIF as a ternary operator should be removed from this list. It is outdated, and not an operator. It evaluates all arguments, which makes it basically useless. The parallel to C#&amp;#39;s ?: operator is If starting with VB 9.0.I have no clue what a binary conditional is supposed to mean. When used with two arguments, If is a null coalescing operator per my item #1 &lt;p&gt;With these corrections tattooed into your frontal lobe, the help page comparing operators becomes very useful.  &lt;p&gt;A number of operators perform different operations.  &lt;blockquote&gt; &lt;p&gt;&amp;amp;= Concatenation assignment in VB and Bitwise And assignment in C#&lt;br /&gt;^= Exponentiation assignment in VB and Bitwise exclusive Or assignment in C#&lt;br /&gt;&amp;amp; Concatenation in VB and Bitwise or Logical And in C#&lt;br /&gt;^ Exponentiation in VB and Exclusive or Logical Exclusive Or in C#&lt;br /&gt;! Qualification (see # 70) in VB and Bitwise or logical Not in C#&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;70) VB has the ! resolution operator. I’m biased against this operator, but you should know what it does if you see it in code. Given the Junk1 class: &lt;p&gt;Public Class Junk1 &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default Public ReadOnly Property Foo(ByVal s As String) As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If s = &amp;quot;Fred&amp;quot; Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return &amp;quot;Flinstone&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property&lt;br /&gt;End Class &lt;p&gt;The same IL results from the ! operator, the default call, or the full call.  &lt;blockquote&gt; &lt;p&gt;Dim j1 As New Junk1&lt;br /&gt;Dim j2 = j1!Fred&lt;br /&gt;Dim j3 = j1(&amp;quot;Fred&amp;quot;)&lt;br /&gt;Dim j4 = j1.Foo(&amp;quot;Fred&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I am biased against this call.&amp;nbsp; First, it gives you two different syntaxes for iterators – one for numerics and one for strings. Second, it makes a string look like compile time checked code. If I search for “Fred” because I’ve made a constant or some other reasons I want to track down all occurrences, I cannot find it if I search as a string. Finally, Fred is a string, not a constant and why the heck make it easier to look good doing the wrong thing. Make the string a constant and use the second syntax.  &lt;p&gt;71) C# has a single equality operator ==. VB has one for value types and strings (=) and one for reference types (Is).Similarly, C# has one inequality operator != where VB has two (&amp;lt;&amp;gt; and IsNot). This can be especially confusing with strings because either operator is valid. The Is and IsNot operator search for a location in memory while the = and &amp;lt;&amp;gt; operators compare the string: &lt;p&gt;Dim s1 = &amp;quot;Fred&amp;quot;&lt;br /&gt;Dim s2 = &amp;quot;Freds&amp;quot;&lt;br /&gt;s2 = s2.Substring(0, 4)&lt;br /&gt;If s1 = s2 Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&amp;quot;= works&amp;quot;)&lt;br /&gt;End If&lt;br /&gt;If s1 Is s2 Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(&amp;quot;Unexpected&amp;quot;)&lt;br /&gt;En If &lt;p&gt;Here, “Unexpected” will not display. However, this relies on details of storage and if you simple assign s2 to the literal “Fred” it will be hit because the compiler figures out that there is only one literal. As a result, don’t use Is with strings. &lt;p&gt;72) The AddressOf operator creates a delegate on the fly: &lt;p&gt;Dim del As EventHandler(Of EventArgs) = AddressOf Button3_Click &lt;p&gt;73) VB has a scope resolution operator of MyClass. This forces the code in the current class to be run, even if an overridden virtual method would point to different code. There is no equivalent in C#. It’s rarely used, but occasionally extremely useful.  &lt;p&gt;74) Use square brackets or qualification (namespace, Me, MyBase, namespace alias, etc) or square brackets when variable names are the same as keywords (often better to avoid keywords).  &lt;p&gt;75) Coming out of the shadows: There are three ways in IL to provide replacement code in a derived class. These are overriding, hideBySig and shadowing by name. I need to write a separate post explaining this nuance because its widely misunderstood. But the short story is: VB overloads the meaning of Overloads to both be an occasionally necessary indicator that something is being overloaded and hide by sig, which is “new” on the method declaration in C#. VB also provides shadowing by name which is not provided by C#. When you mark a method with “Shadows” all base class method declarations with the same name, regardless of signature, is replaced with the new code. Thus you can make signatures go away. But like HideBySig, they are available if someone casts to a base class. Shadows and hide by sig nuances are not widely understood so use some care using techniques relying on this.  &lt;p&gt;76) You can have a method or property in a class that matches the class name. You can’t do this in C# because you’d conflict with the constructor. The Foo class can have a method Foo, leading to Foo.Foo. Or with a nested class named foo with a shared method named Foo and a namespace named Foo you can have Foo.Foo.Foo.Foo. That’s silly, of course.  &lt;p&gt;77) Visual Basic and C# infer parameters for generic extension methods differently. Visual Basic takes a two pass approach – in the first pass, the type arguments for the first (main) parameter is resolved. After this type parameter has effectively been removed from the list, any remaining type arguments are directly resolved or inferred. As a result, both of the following will work in VB: &lt;blockquote&gt; &lt;p&gt;Dim k1 = q.Test1(Of String, Int32)()&lt;br /&gt;Dim k2 = q.Test2(Of String, Int32)()&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where the extension methods are: &lt;p&gt;Public Module ExtensionMethods&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;System.Runtime.CompilerServices.Extension()&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Function Test1(Of TFirst, TSecond, TResult)(ByVal list As IEnumerable(Of TSecond)) As TResult&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;System.Runtime.CompilerServices.Extension()&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Function Test2(Of TFirst, TSecond, TResult)(ByVal list As IEnumerable(Of TFirst)) As TResult&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return Nothing&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;br /&gt; End Module &lt;p&gt;This allows simplification of some LINQ operators. For example: &lt;blockquote&gt; &lt;p&gt;Dim maxIndex = q.Max(Of Integer?)(Function(c) c.Credit)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where C# requires syntax resolvable in a single pass, such as: &lt;blockquote&gt; &lt;p&gt;var maxValue = q.Max((Func&amp;lt;Customer, Int32?&amp;gt;)(cust =&amp;gt; cust.Credit));&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;C# allows you to specify both type parameters on the generic method call: &lt;blockquote&gt; &lt;p&gt;maxValue = q.Max&amp;lt;Customer, Int32?&amp;gt;(cust =&amp;gt; cust.Credit);&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;VB does not allow you to specify a generic type argument for a type parameter inferred from the type of the first argument, it must be inferred so you will receive a compiler error if you attempt to specify both type parameters: &lt;p&gt;Overload resolution failed because no accessible &amp;#39;Max&amp;#39; accepts this number of type arguments &lt;p&gt;----------------------------------------------------------------------------------------------------------------  &lt;p&gt;I still look forward to your input. It’s been a wild ride. What I thought would be a top ten list is now over 75 items and instead of an hour I have a chunk of this week in this list – made much better by the comments and suggestions I’ve received. Stupid mistakes and misunderstandings, things that bit you, etc.  &lt;p&gt;&lt;em&gt;Thanks to Bill McCarthy for suggesting some corrections to 17, 18 and 24 as well as pointing out something in one of his articles that led to 51.&lt;/em&gt; &lt;p&gt;&lt;em&gt;I’ve updated this on 7/22/08 and plan to continue to update this list as people point out additional things, or I think of them. Thanks to a ton of people for their comments, including Jim Wooley, Jay B. Harlow, Lucian Wischik, Erik Meijer, Rod Stephens, Bill McCarthy, Herfried K. Wagner, Cor Ligthert, Rob Teixeira, Rocky Lhotka, Jeff Certain, Steve Smith and &amp;quot;NotMyself&amp;quot;.&lt;/em&gt;&lt;i&gt; Also, Eric and Int19H for pointing out politely a dumb error I made yesterday in the code for 26.&lt;/i&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642135" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>Casting and Converting in Visual Basic</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/07/22/casting-and-converting-in-visual-basic.aspx" /><id>/blogs/kathleen/archive/2008/07/22/casting-and-converting-in-visual-basic.aspx</id><published>2008-07-22T20:20:17Z</published><updated>2008-07-22T20:20:17Z</updated><content type="html">&lt;p&gt;When I wrote the “What a C# Coder Should Know Before They Write in VB” post, I had a log of feedback and conversations around conversions and casting. There are a number of casting and conversion operators in Visual Basic including three general purpose operators:  &lt;blockquote&gt; &lt;p&gt;CType: Converts intrinsic types and any other types that have an overloaded CType operator. There is no comparable operator in C#. Throws and exception if the conversion cannot be completed. &lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;DirectCast: Forces a cast. This is similar to the parentheses style - (newType)variableName cast in C#. Throws and exception if the type is not explicitly the type being cast. &lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;TryCast: Attempts the cast and returns Nothing if it cannot be completed. Trycast never throws an exception. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;As a summary:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;Operator &lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;Type &lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;C# Parallel &lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;Exception on Failure &lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;Usable on Value Types&lt;/em&gt;&lt;/strong&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;CType &lt;/td&gt; &lt;td&gt;Conversion &lt;/td&gt; &lt;td&gt;None – use CLR &lt;/td&gt; &lt;td&gt;Yes &lt;/td&gt; &lt;td&gt;Yes &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DirectCast &lt;/td&gt; &lt;td&gt;Cast &lt;/td&gt; &lt;td&gt;Parentheses style cast &lt;/td&gt; &lt;td&gt;Yes &lt;/td&gt; &lt;td&gt;Yes &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;TryCast &lt;/td&gt; &lt;td&gt;Cast &lt;/td&gt; &lt;td&gt;as operator &lt;/td&gt; &lt;td&gt;No &lt;/td&gt; &lt;td&gt;No &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;DirectCast vs. parentheses style casting in C#: The C# parentheses style cast does an implicit widening cast, while DirecCast does not. This is particularly important when casting integers and floating point (single/double) values. This C# code compiles and runs:  &lt;blockquote&gt; &lt;p&gt;Int32 z1 = 100000; &lt;br /&gt;Int64 z2 = (Int64)z1; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;While this VB code does not compile:  &lt;blockquote&gt; &lt;p&gt;Dim i1 As Int32 = 100000 &lt;br /&gt;Dim i2 As Int64 = DirectCast(i1, Int64) &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I’m a big fan of CType, although not all VB coders are. You can use it just about anytime and it just does the job in a simple, no thinking sort of way. It’s important to understand that it’s looking for any available conversion, including this one (which I wish I could turn off):  &lt;blockquote&gt; &lt;p&gt;Dim k1 = &amp;quot;42&amp;quot; &lt;br /&gt;Dim k2 = CType(k1, Int32) &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;But, I really don’t find myself making this mistake very often, and I’ll happily take the automatic conversions of one numeric into another.  &lt;p&gt;CType is slower than DirectCast, but my tests have shown this to be a very negligible difference.  &lt;p&gt;FxCop (and Static Analysis in Team System) like TryCast and the C# as operator over the comparable check of the type. I don’t think the static analysis tools catch whether you are using TryCast (or as) correctly:  &lt;blockquote&gt; &lt;p&gt;Dim k4 = TryCast(k3, Class1(Of String)) &lt;br /&gt;If k4 IsNot Nothing Then &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; do something with k4 &lt;br /&gt;End If &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Forgetting the check for nothing means you’ve got a null floating around simply because of the failed cast. This could cause some very unfortunate logic errors. You can accomplish the same thing with the TypeOf operator, but since TypeOf (and is in C#) actually perform the cast and throw away the result, you are wasting a few machine cycles when you use code like:  &lt;blockquote&gt; &lt;p&gt;If TypeOf k3 Is Class1(Of String) Then &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim k4 = DirectCast(k3, Class1(Of String)) &lt;br /&gt;End If &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The compiler may at some point be clever enough to optimize these two statements, but today it does not.  &lt;p&gt;VB also has a large set of type specific conversion operators. Note that these are operators, not functions. The distinction is that they are present whether or not you have the Microsoft.VisualBasic namespace imported:  &lt;p&gt;CBool(expression) &lt;br /&gt;CByte(expression) &lt;br /&gt;CChar(expression) &lt;br /&gt;CDate(expression) &lt;br /&gt;CDbl(expression) &lt;br /&gt;CDec(expression) &lt;br /&gt;CInt(expression) &lt;br /&gt;CLng(expression) &lt;br /&gt;CObj(expression) &lt;br /&gt;CSByte(expression) &lt;br /&gt;CShort(expression) &lt;br /&gt;CSng(expression) &lt;br /&gt;CStr(expression) &lt;br /&gt;CUInt(expression) &lt;br /&gt;CULng(expression) &lt;br /&gt;CUShort(expression)  &lt;p&gt;The CStr operator is slightly slower than ToString, but it is localization aware when dealing with dates as are the other VB operators such as CBool.  &lt;p&gt;VB and C# also differ slightly in implicit conversions. For example implicit enum conversions are allowed in VB but not in C#:  &lt;blockquote&gt; &lt;p&gt;Dim k8 = testEnum.Two &lt;br /&gt;Dim k9 As Int32 = k8&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In general, VB expands on the framework and C# conversions to offer globalization.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641775" width="1" height="1"&gt;</content><author><name>Kathleen</name><uri>http://msmvps.com/members/Kathleen/default.aspx</uri></author></entry><entry><title>What a C# Coder Should Know Before They Write VB</title><link rel="alternate" type="text/html" href="/blogs/kathleen/archive/2008/07/19/what-a-c-coder-should-know-before-they-write-vb.aspx" /><id>/blogs/kathleen/archive/2008/07/19/what-a-c-coder-should-know-before-they-write-vb.aspx</id><published>2008-07-19T16:55:56Z</published><updated>2008-07-19T16:55:56Z</updated><content type="html">&lt;h4&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;&lt;font color="#800000" size="4"&gt;NOTE: I&amp;#39;ve updated this post because it shifted from its different intent, needed a new preamble, etc. You can find it &lt;/font&gt;&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;a href="http://msmvps.com/blogs/kathleen/archive/2008/07/25/what-a-c-coder-should-know-before-they-write-vb-updated.aspx"&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#800000" size="4"&gt;here&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;I just had an e-mail exchange with someone looking for a VB lead in Colorado Springs. I think they are going to have trouble filling it with an existing VB expert, and it occurred to me that someone who had led a successful VB 6 -&amp;gt; C# project could fit the bill, if they knew some key things about VB. I told the recruiter I thought the right person with a C# background and the right (respectful) attitude could be a good fit with two weeks work. But in the back of my mind I’m thinking “what resource could she possibly access during those two weeks.”  &lt;p&gt;I am sold on the concept of polyglot programming and think every C# coder should know enough VB to do Office, late binding, and XML work in VB. That’s not what I’m talking about. Those should be wrappers and really the quality of code doesn’t matter.  &lt;p&gt;I’m talking about embracing the language enough to lead a team, and I&amp;#39;m assuming there&amp;#39;s honesty on all sides so the C# coder is admitting they are growing and learning. The framework is so core to what we do that it doesn&amp;#39;t make sense to demand one language or another. But it does make sense if your crossing over in either direction to embrace the elegance of the language you’re going to work in.  &lt;p&gt;Hopefully this can be a dialog as I’m sure I won’t catch everything.  &lt;p&gt;1) Get over the respect thing or quit before you start. VB is a great language.  &lt;p&gt;2) Obviously stop trying to name fields the same as properties with different casing. VB matches case to the declaration, so that’s the only place you care.  &lt;p&gt;3) You type less-characters, or perhaps the same as C#. Spend enough time in the IDE with auto-complete and Intellisense to accomplish this. I’m really sorry about the Ctl-Enter thing, but you can always use a space as VB will generally remove it if it’s wrong. (By the Ctl-Enter thing, I mean that you can&amp;#39;t just hit Enter to accept Intellisense. You must hit Ctl-Enter, or space or some other punctuation).  &lt;p&gt;4) VB is very good at re-indenting and re-spacing for you  &lt;p&gt;5) Switch the Intellisense tab to All. Visual Basic has a Common and an All tab for Intellisense. C# does not make this distinction so the All tab is likely to be most comfortable for a C# coder. The Common tab may leave you wondering where some method or property you need is located.  &lt;p&gt;6) Always turn Strict, Explicit and probably Infer On. Turn Compare to Binary although you can probably just ignore that and use the default. These are all set with Option statements at the top on. Actually, this is too strong. You may want to turn Explicit off to do late binding. As mentioned in #31 below, this is per partial class file so you can provide late binding to a fragment of your class.  &lt;p&gt;7) Retrain the baby finger and ask on Connect for the IDE to remove EOL semi-colons  &lt;p&gt;8) Get to know events. They are declarative with the Handles clause. Figure out that the Handles clause requires WithEvents on the variable. The common syntax for declaring events does not require the Delegate keyword:  &lt;p&gt;Event MyEvent(ByVal sender As Object, ByVal args As EventArgs)  &lt;p&gt;9) Learn how to use Snippets and download the Snippet Editor. Pay attention to abbreviations. Create the snippets you need. Learn to use the ?&amp;lt;tab&amp;gt; keystrokes to find templates.  &lt;p&gt;VB provides a large number of snippets. It can be tedious to find the ones you use often via the menu, and unlike C# snippets don&amp;#39;t show up in Intellisense. Instead, use the snippet auto-complete which you access by typing the first few characters hitting ? and &amp;lt;tab&amp;gt;. This provides access to the appropriate location in an alphabetized list of snippets. In this case, Enter, as well as Ctl-Enter and whitespace punctuation will select the snippet. For a Select Case with an enum, the snippet does not fill in the values. Also, VB&amp;#39;s snippet expansion doesn&amp;#39;t access the class name, so you&amp;#39;ll have an extra field in dependency property snippets.  &lt;p&gt;10) Take advantage of partial namespaces and aliased namespaces. Do not import classes without a good reason  &lt;p&gt;11) A VB module is roughly a C# static class, except it can be used without naming the class. There is some disagreement over whether this is good. Decide and make a standard, but understand how VB uses modules  &lt;p&gt;12) Spend an hour playing with nullables. VB’s comparisons approximate SQL Servers. C#’s comparisons follow different rules. This will especially bite you if you then cast to a Boolean calling null to go to False  &lt;p&gt;13) VB LINQ doesn’t make you include Select. Don’t use it unless you need it. These statements are equivalent because selecting the iterator variable is inferred:  &lt;blockquote&gt; &lt;p&gt;Dim kd = From s In list2&lt;br /&gt;Dim kd2 = From s In list2 Select s&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you wish to select something other than the iterator variable, you can, of course, use the Select statement to define it.  &lt;p&gt;14) VB LINQ has significantly more keywords making single expression LINQ statements possible and are particularly useful with aggregates, Take and Skip  &lt;p&gt;15) Anonymous type mutability is flexible, while anonymous types in C# are always immutable. Explore the Key keyword, and experience creating anonymous types via LINQ and without LINQ  &lt;p&gt;16) Inferred typing is as easy as in C#  &lt;p&gt;17) Spend some time in casting. TryCast is pretty much the same as “as” in C#, DirectCast performs a cast only, no conversions, even widening integers, allowed. CType does a conversion or a cast. For intrinsic types, it converts. For non-intrinsic types without an overloaded CType operator, it casts and is the same as Direct Cast. If there is an overloaded CType operator that the VB compiler can resolve, CType will use that operator. C# does not have a parallel to CType, nor really one for DirectCast, since widening conversions are performed in strict cases. The parentheses cast performs some conversions, such widening integer conversions and floating point to integers, but does not perform the string to date and string to numeric conversions of VB’s CType operator. VB’s CType operator uses banker’s rounding, while the C# parentheses conversion uses simple rounding (1.5 is rounded down in C#, up in VB and in Convert.Int32, Math.Round, etc).  &lt;p&gt;Initially this might be confusing, but the bottom line is you have the option of just using CType for most casting and conversions without really thinking about it, or to use DirectCast and explicit conversion operators if you want to be more explicit. The choice is yours.  &lt;p&gt;To be honest, I didn’t understand all the intracacies and opinions and have updated this in every version of this post so far. I decided casting and conversions deserved their own discussion (&lt;a href="http://msmvps.com/blogs/kathleen/archive/2008/07/22/casting-and-converting-in-visual-basic.aspx"&gt;here&lt;/a&gt;).  &lt;p&gt;18) Understand the difference between VB operators and methods. Explore the operators, particularly the extra work done by the CType casting operator. This work is generally good for your project and it isn’t a meaningful perf hit  &lt;p&gt;19) Explore all the methods and properties of the Microsoft.VisualBasic and make a team decision whether to use them. You do not have to use anything in this namespace and it is not required in all new framework implementations, although Microsoft will continue to include them. Your team might want to keep these familiar features.  &lt;p&gt;20) If you use the Microsoft.VisualBasic namespace, do some perf tests on the Microsoft.VIsualBasic.Collection and consider outlawing it  &lt;p&gt;21) VB uses parens for both method calls and indexes. Sorry.  &lt;p&gt;22) VB uses a single equals for both comparison and assignment. It works because we can’t assign in line. Not assigning in line is good as it enforces a common best practice.  &lt;p&gt;23) There’s a reason for VB’s oddly named AndAlso and your team will appreciate it. A VB 6 comparison is a binary comparison and not short-circuited. Short circuits are two lines and explicit in VB6. For consistency, And in VB.NET is binary. AndAlso is the logical comparison and is short circuited. This is consistent with C#’s &amp;amp; being shorter than &amp;amp;&amp;amp;. Or/OrElse parallels this.  &lt;p&gt;24) Similar, for consistency with VB6, CInt (and CLng, but not CByte) in VB returns -1. This is the only case in which False equals -1. This may be important if people are doing line by line conversions because you cannot tell in VB6 whether the intent of a comparison was logical or binary.  &lt;p&gt;25) Loops and conditionals do not have parentheses  &lt;p&gt;26) With Option Infer On, iterator types are automatically inferred. C# requires the var keyword:  &lt;blockquote&gt; &lt;p&gt;var list2 = new List&amp;lt;string&amp;gt;() { &amp;quot;Bill&amp;quot;, &amp;quot;Percy&amp;quot;, &amp;quot;Fred&amp;quot;,&amp;quot;George&amp;quot;, &amp;quot;Ron&amp;quot; };&lt;br /&gt;foreach (var k in list2)&lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp; // do something&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;While VB infers the type more quietly:  &lt;blockquote&gt; &lt;p&gt;Dim list2 = New List(Of String)(New String() {&amp;quot;Fred&amp;quot;, &amp;quot;George&amp;quot;, &amp;quot;Bill&amp;quot;, &amp;quot;Percy&amp;quot;, &amp;quot;Ron&amp;quot;})&lt;br /&gt;For Each k0 In list2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; do something&lt;br /&gt;Next&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;27) Do loops have direct syntax for looping while and until. You can also exit from within a loop. From Help, the syntax for a Do loop is:  &lt;p&gt;Do { While | Until } condition&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop  &lt;p&gt;-or-  &lt;p&gt;Do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop { While | Until } condition  &lt;p&gt;This does not discuss using Continue with loops. In most cases, Continue does the same thing as C# - going to the top of the next iteration and skipping any remaining statements. However, the VB Continue specifies the type of loop so if you have a single Do and For loops nested you can proceed to the next iteration of the outer loop. This is not common. Again from Help:  &lt;p&gt;Continue { Do | For | While }  &lt;p&gt;VB allows a simple Do Loop if you need an infinite loop (such as a wait cycle):  &lt;p&gt;Do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Exit Do ]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ statements ]&lt;br /&gt;Loop  &lt;p&gt;28) Check the syntax for extension methods. It follows VB’s tradition of being more explicit which will help your team make the transition. In this case, more explicit means the extension method is defined by an attribute.&amp;nbsp; &lt;p&gt;29) Get to know the With keyword. You may decide not to use it, but you should understand how to. It can significantly simplify code and because it avoids re-qualification it will also speeds up your application somewhat.  &lt;p&gt;30) Get to know the ByRef/ByVal semantics. You do not specify ref on the call, only the parameter declaration  &lt;p&gt;31) Get to know partial classes. You specify partial on only one class. Options are per partial, not per class, meaning you can have late binding in small portion of your class without binding overall  &lt;p&gt;32) Visual Basic requires a line continuation character – the underscore. While you are typing code, you may get in the habit of including this, and certainly the compiler will catch your mistakes. However, this can be a pain when rewrapping long lines of code. Consider writing a macro to help you wrap code if this annoys you.  &lt;p&gt;33) VB provides module level imports - that means you can use the same set of imports throughout your project, then add more in specific places. The default includes some I&amp;#39;d suggest removing, especially System.Collection (use only System.Collection.Generics  &lt;p&gt;34) VB has extremely powerful features in My. Explore these and how the Intellisense experience can lead coders to do the right thing. Consider adding your own My features.  &lt;p&gt;35) For WinForms code, VB has a very nice startup framework that includes things like unhandled exception that you may be doing in your C# startup routines. The VB mechanism is very strong and you probably want to use it. You can access these event from the Project Dialog  &lt;p&gt;36) The targeted framework is under advanced options in the Compile tab of Project dialog  &lt;p&gt;37) Namespaces work differently if no namespace is defined. In C# the class goes into the default namespace. In VB, the class goes into the project level namespace. If you put any namespace as the class level, its appended to the project namespace. Assuming all classes in the project are in the same namespace this is very good and flexible. However, if even one class needs to go into another namespace, you have to shift strategy and add explicit namespaces to every file.  &lt;p&gt;38) Interfaces work differently. They are always explicit in VB and you can specify scope within the same declaration for the method addressed directly through the instance. You will probably get to like this very much as it makes the intent much more clear.  &lt;p&gt;39) Hitting Enter on an Interface or Inherits statement creates or updates the required properties and methods. They are empty when created (no &amp;quot;Throw NotImplemented...&amp;quot;). They are not placed in their own region.  &lt;p&gt;40) Refactoring in the box is limited to Symbolic Rename which works well, although simplified. No preview - but who actually previews? If you want additional refactorings, download Refactor! which is free for Visual Basic users.I understand Refactor Pro removes those pesky semi-colons you accidentally typed  &lt;p&gt;41) VB has a handy &amp;quot;Go To Type Definition&amp;quot; in the right click menu. It does not have &amp;quot;Surround With&amp;quot;  &lt;p&gt;42) No iterators. If you need them, consider defining the class in C#  &lt;p&gt;43) While you rarely need to explore it, creating explicit event management code is available and very slick. Thanks Rocky for demanding this.  &lt;p&gt;44) VB XLINQ is amazing. Learn how to use XML namespaces for Intellisense, manage XML as XML regarding missing values (this took a 40 line piece of C# code to three lines in VB, how to output XML, and how to use it as a generalized text processing tool  &lt;p&gt;45) When using VB&amp;#39;s XLINQ for text processing, use lots of calls to embedded expressions rather than creating a monolithic statement as XML literals are still debugged on a per/statement level  &lt;p&gt;46) Creating optional parameters in your new classes is probably not a good idea because it isn&amp;#39;t compliant with C#. Use overloads as you would in C#. However, if you are interacting with code that has optional parameters, you can ignore that Missing constant entirely. Adds a lot of clarity.  &lt;p&gt;47) Consider using named arguments, particularly in dealing with Office. You need to learn this syntax anyway for attributes  &lt;p&gt;48) When you declare array bounds you declare the upper limit, not the length. Thus a string of four elements is Dim x(3) As String. Note that you can include the array bound in the declaration. You can put the parentheses on either the variable name or type, but you must put them on the variable name if you are specifying the upper bound.  &lt;p&gt;49) No multi-line lambdas in this version. When you need a closure, you must use a class. If you do not know how to use a class to build a closure, well, ask me and that probably deserves a blog post. VB also does not have true anonymous methods or void lambdas.  &lt;p&gt;50) Read &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=50"&gt;my column&lt;/a&gt; and &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=69"&gt;Bill McCarthy’s column&lt;/a&gt; (I assume you were already reading &lt;a href="http://visualstudiomagazine.com/columns/columnist.aspx?columnistsid=54"&gt;Bill Wagner’s&lt;/a&gt;). That’s not flippant, we’re covering a lot of basics and overlooked issues, primarily the basics and details of new features  &lt;p&gt;51) Yes, VB does have operator overloading  &lt;p&gt;52) You do not have to repeat the declaration for new variables. Use the second syntax instead of the first:  &lt;p&gt;Dim c As Customer = NewCustomer(&amp;lt;params&amp;gt;)&lt;br /&gt;Dim c As New Customer(&amp;lt;params&amp;gt;)  &lt;p&gt;53) Nothing is not quite the same as null. Nothing is closer to C#’s use of default. If you have a reference type, default in C# is null. Thus, Nothing is the same as null when assigned to or compared with a reference type.  &lt;p&gt;54) The GetType operator in VB is roughly the same as typeof operator in C#. The TypeOf &amp;lt;variable&amp;gt; Is &amp;lt;typeName&amp;gt; is roughly the same as the is operator in C#. Is (without TypeOf) in VB is roughly the same as a == with reference types in C#. The caveat is that this forces the reference type semantics regardless of operator overloads.  &lt;p&gt;55) You can include array bounds  &lt;p&gt;56) Visual Basic has a Redim and Redim Preserve to re-dimension arrays. These can save you some code and possibilities for error, particularly when you use Redim Preserve to keep the currents content of your array.  &lt;p&gt;57) Only use Dim within a class (where you must use it). Use scope declarations in other locations such as class level variables.  &lt;p&gt;58) Visual Basic has separate operators for integer and floating point division. Integer division is \ while floating point is the traditional /. You will hurt performance if you do floating point division only to round back to an integer.  &lt;p&gt;59) Visual Basic has two operators for concatenating strings. You can use either &amp;amp; or +, which accomplish slightly different things. &amp;amp; converts both operands to string via the class’s ToString method. It will not fail with null values, and will concatenate numerics, etc. The + operator must perform type checking before the concatenation and is therefore slower than the &amp;amp; according to MSDN  &lt;p&gt;60) Do not use On Error. This is a holdover from VB6. While you can accomplish VB6-like behavior it makes for very messy and potentially slower IL, regardless of whether an exception occurs. On the other hand, if you’re desperately trying to move code into .NET, perhaps it will be a short term crutch.  &lt;p&gt;61) While it may not aid readability, if you feel compelled to include multiple statements on one line, use a colon to separate them.  &lt;p&gt;62) You can’t do in line assignments – a single equals is a comparison operator in these contexts. Similarly, you can’t increment and decrement in place. You can however use the increment and assign (+=), concatenate and assign (&amp;amp;=) and similar operators.  &lt;p&gt;63) The Default keyword defines the property that is analogous to the indexer in C#. This property must have a parameter and can be accessed without specifying the property name. The following two code fragments (where list is System.Collections.Generic.List(Of T)) are identical:  &lt;p&gt;X = list(42)&lt;br /&gt;X = list.Item(42)  &lt;p&gt;You can define default properties on your own collection classes via the Default keyword.  &lt;p&gt;64) The meaning of “anonymous delegate” is different in Visual Basic and C#. In C# it’s an inline delegate. In VB it’s basically an inferred delegate (thanks to Lucian for the fragment):  &lt;p&gt;Delegate Function D(ByVal x As Integer) As Integer&lt;br /&gt;Dim f = Function(x As Integer) x + 1&lt;br /&gt;Dim d1 As D = f&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Dim d2 As Func(Of Integer, Integer) = f&amp;nbsp; &lt;p&gt;65) Constraint syntax on generics is a little different, along with providing multiple constraints. The VB and C# syntax below are identical:  &lt;p&gt;Public Class SomeClass( _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Of T As New, _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 