This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Property Statement
Used to assign values, arrays or other objects to variables.
[Default|ReadOnly|WriteOnly] Property varname ([parameter list]) [As typename]
Get
[block]
End Get
Set
[block]
End Set
End Property
Parameters
- varname
- Required. A unique name that identifies the Property.
parameter list
Required. This identifies the signature of the property. Unless specified, the list default is ByVal.
- typename
- Optional. If no is specified, the default type is Object.
Remarks
The declaration of the property determines what the user can do with that property:
- If the ReadOnly modifier is used, the property is known as a "Read-only property" and must only have a Get…End Get block. Therefore, the user is only able to retrieve the value of the property. An error will be raised if the user attempts to assign a value to that property.
- If the WriteOnly modifier is used, the property is known as a "Write-only property" and must only have a Set…End Set block. This allows the user to store a value to the property. An error will be raised if the user attempts to refer to the property, except in the assignment of a value to that property.
- If the Default modifier is used, or if no modifier is used, the property must have both a Set…End Set and a Get…End Get block. The property is said to be a read-write property.
See Also