Overloading Shared Members

Chapter 7 introduced basic object-oriented concepts related to defining classes and members, and Chapter 10 introduced overloading, overriding, and shadowing. Overloading rules for instance methods apply to shared methods.

Overloading Shared members refers to two or more procedures that have the same name, use the Overloads Shared modifiers for properties and methods, and rigorously adhere to differentiating requirements. Specifically, the compiler must be able to use key aspects of the signature of the method call to determine which method (or property) is meant to be called by the user.

Specifically, overloaded shared members

  • Can't be differentiated only by the argument modifiers ByVal or ByRef.

  • Can't be differentiated ...

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