Visual Basic Blog

A group blog from members of the VB team

Latest posts

Mar 10, 2007
Post comments count 0
Post likes count 0

Extension Methods Best Practices (Extension Methods Part 6)

VBTeam

This is the sixth installment in my series of posts about extension methods. You can find links to the rest of the series here. Today I am going to talk about some best practices for using extension methods. Most of this content is geared toward authors of class libraries designed for wide spread consumption. Developers of such libraries often need to worry about things like making their API's future proof, and finding ways to extend their libraries while still preserving backwards compatibility. In most real world applications these suggestions can (and quite frankly should!) be completely ignored. However, if y...

Mar 8, 2007
Post comments count 0
Post likes count 0

Making your VB code ready to go global (Matt Gertz)

Anthony D. Green [MSFT]

Greetings, all! I’m Matt Gertz, the Dev Manager for Visual Basic team.  I’ve been on the team for a bit over 12 years, via the Blackbird/Visual InterDev side of the product, and in that time have been a dev on various features (mostly IDE-related), dev lead of deployment, dev lead of compiler, and box lead before my current responsibilities as DM.  I’ve been somewhat remiss in not having posted to this blog before, being content to hang out on the VB IDE Forum, but it’s my intent to correct that situation and to throw out a few thoughts here and there.  Many of our clever folk here have been writin...

Feb 28, 2007
Post comments count 0
Post likes count 0

March 2007 Orcas CTP Available

VBTeam

The March 2007 Orcas CTP is now available for download.You can see Soma's anouncement about it here.This is the first Orcas CTP to include new VB 9.0 features and is the first update of VB LINQ since last year's May 2006 LINQ CTP.Amongst a lot of other really cool Orcas stuff, this CTP includes previews of the following VB 9.0 features: You can download it here.Also, downloading the CTP is a great way to checkout the things I've been talking about in my recent posts about extension methods.  

Feb 15, 2007
Post comments count 0
Post likes count 0

Extension methods and Generics (Extension Methods Part 5)

VBTeam

This is the 5th installment in my series of posts about extension methods. You can find links to the rest of the series here. Originally I had planned on discussing extension method versioning issues, but I've decided to postpone that topic to my next post and talk about extension methods and generics instead. In Orcas we've introduced a new set of rules for the way we deal with generic extension methods that differs significantly from the way we deal with regular generic methods. When binding against extension methods we now perform generic type parameter inference in two passes instead of one. During the first ...

Jan 24, 2007
Post comments count 0
Post likes count 0

Extension methods and late binding (Extension Methods Part 4)

VBTeam

This is the fourth installment in my series of posts about extension methods. You can find links to the rest of the series here. Today I'm going to talk about extension methods and late binding. Essentially there isn't much to say about it, other than the fact that we don't support late bound execution of extension methods. For the most part this isn't a big deal as one of the primary benefits of extension methods is its interaction with intellisence which doesn't work in late bound scenarios anyways. Unfortunately, however, there is one big side effect of this decision that you need to be aware of when authoring...

Jan 24, 2007
Post comments count 0
Post likes count 0

Articles about Extension Methods

VBTeam

Here is a list of links to posts on this blog that talk about extension methods:

Jan 19, 2007
Post comments count 0
Post likes count 0

Extension Methods (part 3)

VBTeam

In my previous 2 posts I talked about some of the benefits of extension methods and then delved into the details of our new binding rules for consuming them in your programs. Today I'm going to talk about some perils to be aware of when defining extension methods. First, however, I'm going to dig a little into the mechanics used by the compiler for evaluating extension method calls. Essentially, whenever the compiler detects a call to an extension method, it simply translates it into a call to the underlying module method, passing in the call's receiver as the method's first argument.If we take the following simp...

Jan 11, 2007
Post comments count 0
Post likes count 0

Extension Methods (part 2)

VBTeam

In my previous post I gave a high level overview of some of the benefits of using Extension Methods in VB 9.0. Today I'm going to delve into some of the details about how to define extension methods and then use them in your programs. Defining Extension Methods You can define an extension method by creating a method in a VB module and decorating it with the System.Runtime.CompilerServices.Extension attribute. The type of the methods first parameter specifies the type the method extends, and the remaining arguments indicate the method's signature. In general, we allow an extension method to be defined on any type ...

Jan 5, 2007
Post comments count 0
Post likes count 0

Extension methods (part 1)

VBTeam

Hi. I'm Scott Wisniewski, a dev on the VB Compiler Team. I've been here for a while now (about a year and a half), but this is my first blog post. I've been spending the past seven months or so working on Orcas, and finally decided it would be a good time to come up for some air, talk about what I've been working on, and start to actually make a dent against my blogging commitments. I figured the best place to start is with my favorite feature: extension methods. If you didn't know this already, one of the new features we are adding to VB 9.0 is Extension Methods, which provide a very powerful and elegant way to ...