Visual Basic Blog

A group blog from members of the VB team

The Temple of VB (Matt Gertz)

Hi, all!It's been a while since I've posted to this blog, and a lot has happened in my world since then.  Though I've been pretty busy on our engineering systems team, I took a little time off last summer to do some traveling and, more importantly, some long overdue writing.  Although I'd always enjoyed writing the "here's how ...

VB XML Cookbook, Recipe 7: Enumerating Large XML Files (Doug Rothaus)

VB XML Cookbook, Recipe 7: Enumerating Large XML Files (Doug Rothaus)It’s been a while since I wrote one of these XML cookbook entries. Here’s some info on a common problem: Really big XML files.I’m going to show you two things in this recipe. The first is a tip on reading very large XML files while still being able to use ...

Using HTML entities in XML Literals (Avner Aharoni)

One of the common use-cases of XML literals is creating HTML. However, HTML entities cannot be used in XML literals since LINQ to XML directly supports only the Data type definitions (DTD) defined in the XML 1.0 spec. You can read more about it here. The workaround is to use the Unicode representation of the entity, although it’s not as ...

On The Blink (Matt Gertz)

One of the really fun things about being associated with the Visual Basic team is getting to see all of the varied usages to which our customers put it.  From enterprise software to games, our customer base covers a wide range.  The most fun to see, however, are the hobby applications, because the writers of that code come up with ...

There’s No Such Thing As Too Much Euchre! (Matt Gertz)

“Oh, no!”  I hear you cry, “not another blog about Euchre!”Well, I do like the game, to be sure.  But, more importantly, the Euchre scenario enables me to try out any new technologies on a reasonably complex problem (using Visual Basic, of course).  It’s my way of checking out our product to make ...

Spot the Bug! – The Key to using Anonymous Types (Jonathan Aneja)

This one’s going to be long, but for those of you who’ve felt the first 3 in this series were too easy I promise this one’s tougher J. Let’s say you want to list all the customers from a table in a ComboBox, and update the UI based on which one is selected.  To do this we’ll need to bring back two fields...

Spot the Bug! – Is it in VB or XAML? (Jonathan Aneja)

What’s wrong with the following WPF code?   Class Window1     Sub OK_Click(sender As Object, e As RoutedEventArgs) Handles OK.Click       MsgBox("Button Clicked")   End Sub   End Class   <Window x:Class="Window1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/...

Linking Zune media items with LinQ, Part 2 (Matt Gertz)

In this post, I’ll continue on with coding the new playlist shuffler.  If you haven’t read part 1 yet, I highly recommend it so that this post will make more sense. JCode for the controls (continued)The Title TextBoxWhen the title changes, we’ll want to indicate that the playlist has changed, and we’ll want to ...

Linking Zune media items with LinQ, Part 1 (Matt Gertz)

Way back in October 2007, I wrote up a few posts (here and here) on my experiments with the Windows Media Player object model.  The problem I was trying to solve was that, when I had a playlist set to “shuffle,” WMP would break up songs that should always play together (for example, Jackson Browne’s “The Load-Out&...