Visual Basic Blog

A group blog from members of the VB team

LINQ Deep Dive and Best Practices Presentation Materials (Lisa Feigenbaum)

I presented the following talk this week at VSLive! Orlando 2008:Visual Studio 2008: LINQ Deep Dive and Best PracticesLINQ (Language Integrated Query) is a key platform innovation introduced with Visual Studio 2008 which brings SQL-style query expressions into VB and C# enabling you to describe what data to reason about instead of how to ...

VB 2008 IDE Tips & Tricks Presentation Materials (Lisa Feigenbaum)

Last week I went on a user group tour around Southern California. I've uploaded the materials from my talk: You can find these all posted together on the following Code Gallery page.The demo requires installation of Refactor!, which is a 3rd party tool available for free on MSDN. I also pointed out a number of resources at the end of ...

How LINQ to Dataset works in VB (Jonathan Aneja)

LINQ at its core requires any data source to be queryable, which basically means it must implement IEnumerable.  (It’s actually a bit more complicated than that, for a full explanation see section 11.21.2 of the Visual Basic 9.0 Language Specification).  Now when working with LINQ to Dataset we have a problem: DataTable does ...

Using LINQ to Dataset in an .aspx page (Jonathan Aneja)

Recently I got a customer question about how to use LINQ to Dataset in an .aspx file.  The compiler was complaining that it couldn't find the AsEnumerable method that allows LINQ to work over a DataTable ("AsEnumerable is not a member of 'DataTable'").  The code he sent looks correct, so why is the compiler not picking up the ...

Visual Basic "Learn" Section of MSDN – Give it a Spin (Beth Massi)

The Learn tab of the Visual Basic Developer Center is being updated with a bunch of new content and VS 2008 topics. If you look at the center of the page you'll see the list of topics and when you click one, you should now see some fresh stuff. Currently there's over 200 items presented on the topic pages and we're adding ...

VB XML Cookbook, Recipe 5: The “Halloween” Problem (Doug Rothaus)

In the last two XML cookbook entries, we talked about the technique of using the ReplaceWith method to perform an identity transform. While this technique may meet your needs, it can introduce a problem in your code commonly referred to as the “Halloween” problem. Let’s take a look at what the problem is, and how to solve it. (For ...

Converting SQL to LINQ, Part 10: Like (Bill Horst)

This post assumes you’ve read my previous Converting SQL to LINQ posts. I haven’t had much in the way of specific requests for more LINQ posts, so I’d still welcome any suggestions that people want to offer.  I did get one request about how to mimic the LIKE keyword functionality in VB LINQ. In SQL, the LIKE ...

Come join me on a Southern California user group tour (Lisa Feigenbaum)

I will be presenting on the VB IDE in Southern California this week at a series of user group meetings. The events will be held in the San Diego and the Los Angeles area. Charlie Calvert from the C# team will be flying down from Redmond to speak as well. The schedule is as follows:  I will be speaking on Visual Basic 2008 ...

VB XML Cookbook, Recipe 4: Get Inner XML from the Nodes Property (Doug Rothaus)

Recipe 3 showed one way to work with mixed XML content using the XML Descendant axis property and the ReplaceWith method. This is one way to do an identity transform and we’ll look at another method in a later post. There is a key capability not mentioned in Recipe 3 that you will need for fully-functioning identity transforms. That is ...