Declare Menu
The Declare menu allows you to add a members group to your types. You can use the Declare Menu to generate a pattern, change/overload base class members, etc.
How to Use
- Place the caret in a member definition and press Alt+Insert.
The Declare menu appears.
- Choose the action from the menu (for example, Properties) and press Enter.
- Use the mouse or Space key to select members for which to generate properties.
- Press Ctrl to open the Options menu (optionally).
- Use the mouse or corresponding letter keys listed in the menu to change options.
- Press Enter to close the menu.
- Press Enter to confirm the selection and perform the declaration.
The code snippet below shows the declared property.
public class Temperature {
int fahrenheit;
int celcius;
internal int Fahrenheit {
get
{
return fahrenheit;
}
set
{
fahrenheit = value;
}
}
}
Declare Items
The Declare menu supports the following actions: