Members (F#)

This section describes members of F# object types.


Members are features that are part of a type definition and are declared with the member keyword. F# object types such as records, classes, discriminated unions, interfaces, and structures support members. For more information, see Records (F#), Classes (F#), Discriminated Unions (F#), Interfaces (F#), and Structures (F#).

Members typically make up the public interface for a type, which is why they are public unless otherwise specified. Members can also be declared private or internal. For more information, see Access Control (F#). Signatures for types can also be used to expose or not expose certain members of a type. For more information, see Signatures (F#).

Private fields and do bindings, which are used only with classes, are not true members, because they are never part of the public interface of a type and are not declared with the member keyword, but they are described in this section also.



let Bindings in Classes (F#)

Describes the definition of private fields and functions in classes.

do Bindings in Classes (F#)

Describes the specification of object initialization code.

Properties (F#)

Describes property members in classes and other types.

Indexed Properties (F#)

Describes array-like properties in classes and other types.

Methods (F#)

Describes functions that are members of a type.

Constructors (F#)

Describes special functions that initialize objects of a type.

Operator Overloading (F#)

Describes the definition of customized operators for types.

Events (F#)

Describes the definition of events and event handling support in F#.

Explicit Fields: The val Keyword (F#)

Describes the definition of uninitialized fields in a type.