Nested Types
From The Oxygene Language Wiki
(Redirected from Nested (keyword))
This is a Language topic about Oxygene
Language Topics Introduction | Structured Overview | Grammar | Keywords | Functions
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.