Visual Basic Blog

A group blog from members of the VB team

Latest posts

May 21, 2008
Post comments count 0
Post likes count 0

Do you have an opinion about Visual Studio and .NET Framework developer Help content?

VBTeam

Our Help content architect, Kathleen McGrath, has created a short, anonymous survey (15 questions/10 mins.) to gather input on how and when the Visual Studio and .NET Framework developer Help content is used, how satisfied you are with it, and about areas that need improvement:Link to the Visual Studio and .NET Framework Developer Documentation Survey(Kathleen will also be taking this survey with her to TechEd in June.)The focus of this survey is content improvement. We want to learn more about the types of applications you're creating, the tools/technologies you're using, and how we can improve our content and c...

May 15, 2008
Post comments count 0
Post likes count 0

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

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 access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we’ll uncover tips, tricks, and best practices for writing queries that will help you write robust, high-performing, maintainable business applicatio...

May 15, 2008
Post comments count 0
Post likes count 0

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

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 the talk that you might be interested in: Thanks & Enjoy!Lisa

May 14, 2008
Post comments count 0
Post likes count 0

How LINQ to Dataset works in VB (Jonathan Aneja)

VBTeam

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 not implement IEnumerable, so how can we query over it? As we saw yesterday, Visual Studio 2008 includes an assembly called System.Data.DataSetExtensions.dll, which defines an extension method called AsEnumerable().  Here’s what this method looks like: &nb...

May 13, 2008
Post comments count 0
Post likes count 0

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

VBTeam

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 extension method (defined in System.Data.DataSetExtensions.dll)? <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication6._Default" %> <%@ Import Namespace="System.Linq" %><%@ Import Namespace="System.Data.DataSe...

May 9, 2008
Post comments count 0
Post likes count 0

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

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 more every week. Right now each of the topics are displayed in a fixed order by content type (i.e. Webcast, Video, Article, Blog, etc.) but we plan on adding a tag cloud for easier navigation and more community features going forward so check back often. You can also subscrib...

May 8, 2008
Post comments count 0
Post likes count 0

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

VBTeam

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 details on the “Halloween” problem and recommended solutions, see this topic in the documentation.) The “Halloween” problem describes a scenario where you have a set of data that is updated in some fashion while enumerating through that data set. As a result, you can encounter a null r...

May 7, 2008
Post comments count 0
Post likes count 0

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

VBTeam

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 keyword compares a string field against a pattern and returns a Boolean value representing whether the string matches the pattern.  For example, if I wanted to select every customer in the 206 area code, I could use this SQL query:  The LIKE expression can inclu...

May 5, 2008
Post comments count 0
Post likes count 0

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

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 IDE Tips and Tricks: In this talk, we’ll show how to turn yourself into a Visual Studio 2008 guru with the new language and IDE features. Tips and tricks will include how to maximize your VB IntelliSense experience, leverage Refactoring features, and improve the perform...