Partial Interfaces
Visual Basic 2015 introduces partial interfaces, which work exactly like partial classes and partial modules, meaning that you can split the definition of a single interface into two or more code files. This helps keep your code organized in case of very long interface definitions. To define a partial interface, you use the Partial
keyword. For example, suppose you have a separate code file with the following partial definition, which extends the IDocument
interface with a VersionNumber
property of type System.Version
:
Partial Public Interface IDocument Property VersionNumber As VersionEnd Interface
As usual, IntelliSense helps you pick up one of the interfaces that you can extend. When you ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.