Partial Methods
Since Visual Basic 2008 and the .NET Framework 3.5, you can take advantage of another interesting feature that has been included in Visual Basic 2010: partial methods. Basically this feature has been mainly introduced in LINQ to ADO.NET, but it can be used in different scenarios for other language features. The concept behind partial methods is the same as partial classes: Methods implementations can be split across multiple parts. Partial methods have three particular characteristics: They must be Private methods, they cannot return values (that is, only Sub methods are allowed), and their bodies must be empty in the class in which methods are defined. Consider the following code, in which a class named Contact is split across ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access