Skip to content

Operator Member Access

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Operators › Operator . (Member Access)

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

Parameters

  • lhs
  • T
  • rhs
  • U
  • 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.

Return Value

Returns a reference to the member specified by rhs.

Remarks

Usage

result = lhs . rhs

Dialect Differences

  • None

Differences from QB

  • None

See also

Examples

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

Category: Operators
Kind: operator


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally