O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extension Methods

Extension methods are a feature that Visual Basic 2010 inherits from its predecessor. As for other features discussed in this chapter, their main purpose is being used with LINQ, although they can also be useful in hundreds of different scenarios. Basically extension methods are special methods that can extend the data type they are applied to. The most important thing is that you can extend existing types even if you do not have the source code and without the need to rebuild class libraries that expose types you go to extend—and this is important. For example, you can extend .NET built-in types, as you see in this section, although you do not have .NET source code. We now discuss extension methods in two different perspectives: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required