...

/

Protection Attributes

Protection Attributes

Learn how to specify and define protection attributes.

We'll cover the following...

Specifying protection attribute

Protection attributes limit access to the members of structs, classes, and modules. There are two ways to specify protection attributes:

  • At struct or class level to specify the protection of every struct or class member individually

  • At module level to specify the protection of every feature of a module individually: class, struct, function, enum, etc.

Protection attributes can be specified using the following keywords. The default attribute is public.

  • public ...