Operator . (Member Access)
 
Returns a reference to a member from a reference to an object

Syntax

Declare Operator . ( ByRef lhs As T ) ByRef As U

Usage

result = lhs . rhs

Parameters

lhs
An object.
T
A user-defined type.
rhs
The name of a member to access.
U
The type that rhs refers to.

Return Value

Returns a reference to the member specified by rhs.

Description

Operator . (Member access) returns a reference to a member of an object.

Operator . (Member access) can also be used to access members of an implicit object inside a With..End With block.

This operator cannot be overloaded.

Example


Type T
    As Integer a, b
End Type

Dim x As T

'' Access the member 'a' of x.
x.a = 10

'' Access the member 'b' of x.
With x
    .b = 20
End With


Dialect Differences

  • None

Differences from QB

  • None

See also