Nested Types

Classes can also define Nested Types. Nested types are like regular custom types, except they are considered part of the class and their visibility can be scoped as granular as all class Members.

Nested types aree declared using the nested in syntax, and (outside of the containing class) are referred to in the same way as static class members would – prefixed with the name of the class, and dot.

Refer to the Nested Types topic for more details.

type
  OuterClass = public class
  end;

  InnerClass nested in OuterClass = public class
  end;

These can be accessed like OuterClass.InnerClass.

Visibility

A visibility level modifier can be applied to a class type, the default level is assembly. Note that because nested types are considered class members, they can be applied the full range of more granular member visibility levels, instead od just public or assembly.

Other Modifiers

A nested type can be any Custom Type or Type Alias that is marked with the nested in Type Modifier.

See Also