O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Property Statement

Syntax

[Default] 

[accessmodifier] [ReadOnly| WriteOnly] _
      [ClassBehavior] Property name _
      [(arglist)] [As type] [Implements interfacemember]
    Get
       [statements]
    End Get
    Set 
       [statements]
    End Set
End Property
Default (optional; Keyword)

Specifies that the property is the default property. Must have both a Get and a Set block.

accessmodifier (optional; Keyword)

One of the keywords Public, Private, Protected, Friend, or Protected Friend. For more information, see Section 4.7 in Chapter 4.

ReadOnly (optional; Keyword)

Indicates that the property is read-only. Must have only a Get block. (If you try to write a Set block, VB will generate a syntax error.)

WriteOnly (optional; Keyword)

Indicates that the property is write-only. Must have only a Set block. (If you try to write a Get block, VB will generate a syntax error.)

ClassBehavior (optional; Keyword)

One of the following keywords:

Overloads

Indicates that more than one declaration of this function exists (with different argument signatures). For more detail, see Chapter 4.

Overrides

For derived classes, indicates that the function overrides the function by the same name (and argument signature) in the base class. For more detail, see Chapter 4.

Overridable

Indicates that the function can be overridden in a derived class. For more detail, see Chapter 4.

NotOverridable

Indicates that the function cannot be overridden in a derived class. For more detail, see Chapter 4.

MustOverride

Indicates that the function ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required