Keyword

# Protected

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to indicate the most mid-level scope for a members of classes and modules. <span class="title-ref">Protected</span> members can only be accessed from outside the class or module in specific situations.

## Notes

In Modules, <span class="title-ref">Protected</span> means that you have to prefix the name with the module name when used outside the Module. For example a <span class="title-ref">Protected</span> property would be referred to by:

``` xojo
ModuleName.PropertyName
```

In Classes, <span class="title-ref">Protected</span> means that the item can be used in itself or its subclasses.

You do not directly use this keyword in your Xojo code. You set scope in the Inspector for the item.

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Private</api/language/private>`, `Public</api/language/public>` keywords

</div>
