Visual Basic Blog

A group blog from members of the VB team

Visual Basic 11 Beta Available for Download!

As you may have read in Jason’s announcement, today we announced that Visual Studio 11 Beta is now available for download.  This is a huge release for Visual Basic as it provides full platform support for building Windows 8 Metro style apps, a first-class asynchronous programming experience, and also the long-awaited Iterators ...

Using Entity Framework in Silverlight with Visual Basic

If you’re looking for ways to get started with Entity Framework 4.0 in Visual Basic then be sure to check out this month’s issue of CODE Magazine.  In it the Entity Framework team has put together a walkthrough that shows how to use EF4 in Silverlight, and best of all the entire article’s in VB!   Using Entity ...

Hidden Gems in VB2010 – Serializing Objects that Raise Events (Jonathan Aneja)

By now you've likely heard about the major new features coming in VB 2010, but there's also a number of smaller additions in the language and IDE that might not be as readily noticeable.  "Hidden Gems" will be a multi-part series where we'll explore some of these smaller enhancements.  First up - serialization! Let’s say ...

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/...

Spot the Bug! – Much Ado about Nothing… (Jonathan Aneja)

Microsoft has this neat mailing list called “Spot the Bug” where developers can send interesting snippets of code that look correct but actually have subtle bugs in them.  The puzzles are a lot of fun and I’ve always thought it’d be a fun thing to try here on the team blog.  Over the past year or so I’ve been keeping a list...

Properties vs Fields – Why Does it Matter? (Jonathan Aneja)

The other day I got an email from a developer asking an interesting question about VB10’s Auto-implemented Properties feature. “I am, however, somewhat confused regarding the properties feature you mentioned - i.e. turning 11 lines of get/set/backing variable into one line. Wouldn't this be exactly the same as the existing ...

Dynamic Searching using LINQ – Dataset + Joins

About two years ago I posted some code that shows how to dynamically construct LINQ queries at runtime.  On average there's a couple questions per month about trying it in some edge case, and usually the support already exists within the API.  Recently though someone posted a question that has to do with Datasets and Joins that ...