Members

This section describes members of F# object types.

Remarks

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, Classes, Discriminated Unions, Interfaces, and Structures.

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. Signatures for types can also be used to expose or not expose certain members of a type. For more information, see Signatures.

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.

Topic Description
let Bindings in Classes Describes the definition of private fields and functions in classes.
do Bindings in Classes Describes the specification of object initialization code.
Properties Describes property members in classes and other types.
Indexed Properties Describes array-like properties in classes and other types.
Methods Describes functions that are members of a type.
Constructors Describes special functions that initialize objects of a type.
Operator Overloading Describes the definition of customized operators for types.
Events Describes the definition of events and event handling support in F#.
Explicit Fields: The val Keyword Describes the definition of uninitialized fields in a type.