Posts Tagged ‘Scope’

Refactorings for changing members accessibility and scope visibility

February 13th, 2012 Comments off

There are a couple of visibility-changing refactorings shipped in DevExpress Refactor! Pro.

Reduce Visibility

This refactoring allows you to quickly reduce the visibility of a member to match the highest calling visibility, in other words, to restrict the visibility as much as possible.

Read more…

Refactorings for variable scope widening (Widen Scope)

January 24th, 2012 Comments off

The scope of a variable declaration determines its visibility to the rest of a program. Scopes can be member-level, class-level and nested, where an inner scope may re-declare the meaning of a variable from an outer scope.

When declared inside a member, the scope of the variable is the entire member after the variable declaration, including all nested code blocks. This means that the variable is available to use within the member but when control passes to another member, the variable is unavailable.

Read more…

Coding Helpers – Scope Cycle

November 11th, 2010 Comments off

The Scope (Visibility) Cycle feature adds the capability to quickly change the visibility modifier of the active member using a single shortcut. In a source code file, if your text caret is anywhere within or on a member (method, function, property, class, etc) definition, you can use the Alt key with the Up and Down arrow keys, to cycle through the legal visibility modifiers:

Read more…