ReSharper Web Help

ReSharper Help: Encapsulate Field

The Encapsulate Field refactoring allows you to quickly create a property from an existing field.
Usages of the field are updated automatically.

In particular, through the use of properties created with the Encapsulate Field refactoring, you can
disallow direct access
to that field. The effect achieved with Encapsulate Field is similar to that of the
Generate Property
code generation feature.

To encapsulate a field

Position the caret on the field (any usage or declaration) in the editor.