July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Extension methods are a feature that Visual Basic 2015 inherits from its predecessors. 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 scenarios. 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: learning to ...