Interfaces Additions

The Visual Studio 2010 IDE offers default solutions according to naming conventions it finds in your code. This is particularly true if you want to generate interfaces instead of other types. For example, if you type

Dim interfaceVariable as ITestInterface

The IDE notices that ITestInterface’s identifier begins with the I letter; therefore, it assumes you want to generate an interface. Because of this, the default solution in the correction options will not be Generate Class but Generate Interface. The stub for the new interface is simply the following:

Interface ITestInterface End Interface

If you want to change the accessibility level for the new interface, you need to generate it invoking the Generate New Type window or ...

Get Visual Basic® 2010 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.