Last week we took a look at Extension Methods in CSharp. Today we will continue looking at Extension methods using VB.NET syntax. It’s obvious by comparing the syntax in VB.NET to the syntax we used in C#, that either there was a strong disagreement as to how to implement Extension Methods syntactically, or the language teams never talk to each other.
The key difference between the implementations is that VB.NET requires you to place the method in a module and attribute the method as an extension method. Let’s take a look.
Like this Article? Subscribe to get every article sent to your email.
- Object Initialization in CSharp 3.0 and VB.NET 9 Yesterday we looked at the new var keyword in CSharp. This makes CSharp variable declaration similar to VB. After all, they've had the DIM keyword for years which essentially does the […]
- Anonymous Types So, let's get to work looking at anonymous types in .NET.As you know, last week we looked at object initialization. Object initialization allows us to instantiate an object and […]
- Lambda Expressions. Other than LINQ… ... what are they good for?If you haven't caught on yet, I'm inching my way toward LINQ. By the time I get to it, it will probably be about a 5 - 10 minute presentation just […]
- Intellisense Everywhere in VB 9 (and a small bug) One of the features the CSharp guys have had for quite a while is Intellisense everywhere. Want to create a private variable? Just start typing private and hit the tab key as soon as the […]
- What’s In My Blogging Toolbox? So as I thought this week about what I might write, I decided to review the various tools that I use to get stuff done. I started this post with the stuff I use to create the blog […]
About Dave Bush