Nested Types

From RemObjects Software

Jump to: navigation, search

This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.



Oxygene supports nested types, which are types that are a member of another type (usually a class or a record).

Nested types are declared by adding the keywords "nested in" followed by the parent type to the name. They can only be nested in types that are defined in the same project.

For example:

type
  Address nested in Person = public class
    ...
  end;

  Gender nested in Person = public enum (Male, Female);

  ClickEventHandler nested in Button = private delegate ...;

Visibility Levels

Since nested types are considered members of their parent class, the full set of 6 visibility levels can be applied to nested types, beyond just "public" and "assembly". See Class Member Visibility Levels for more details.


See Also


Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0 Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)

GlossaryKeywordsLanguage FeaturesPlatform FeaturesSamplesArticlesHow ToIssues

Personal tools