The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


The Shared keyword indicates that one or more declared programming elements are shared. Shared elements are not associated with a specific instance of a class or structure. You can access them by qualifying them either with the class or structure name, or with the variable name of a specific instance of the class or structure.

The Shared keyword is used in these contexts:

Dim Statement

Event Statement

Function Statement

Property Statement

Sub Statement

See Also

Lifetime | Procedures | Structures: Your Own Data Types | Understanding Classes

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft