Create from Usage
With ReSharper, you can use a method/function, property, local or field variable or even a class before it's been declared. ReSharper will suggest a quick-fix (for C#) or several context actions (for VB.NET) for generating the corresponding symbol based on the usage, and then smartly adjust the declaration according to the usage context. For example, if you create a method from usage, ReSharper will not only create a method, but also detect its return type as well as the types of its parameters.
Generate Type Constructor
Select Constructor in the Generate pop-up menu, and then select the fields, auto-properties and base constructors that you wish to initialize in the constructor. Creating constructors in this way takes just a few keystrokes.
Create stubs for implementing interface/overriding inherited member functions. When a list of available methods to implement/override is provided; appropriate stubs are generated. You can generate several stubs at once by selecting several methods when prompted. Overriden properties can be made automatic.
Generate Content Tags
When you're working with ASP.NET Web Forms projects or applications that make use of master pages,
ReSharper is able to generate
Content tags in markup pages based on
ContentPlaceHolder tags defined in a referenced master page.
To use this feature, press Alt+Ins in a markup page that inherits from a master page.
To learn more about code generation and other features that ReSharper makes available to web developers, see ASP.NET and ASP.NET MVC Tools.
Generate Type Members
You can quickly generate different type members with ReSharper, by simply pressing Alt+Ins.
First, select Read-only properties or Properties in the Generate menu. Second, select one or more fields when prompted in the dialog box. Voila. Optionally, you can make the new property virtual, or copy XML documentation from field declarations.
Generate Delegating Members
Delegating members provide a means to encapsulate some behavior or publish methods of a class's field through the class's own interface. Specify fields and their methods, and ReSharper will generate wrapping methods in the current class.
Generate Formatting Members
In any class, you can quickly generate a
ToString() override which returns a format string with
any number of type fields or auto-properties.
Generate Equality Members
method for the current type. ReSharper not only creates the
methods, but also generates the necessary code for an equality check and/or for calculating hash code.
In addition, ReSharper can generate equality and inequality operators, or strongly typed
Configure Generation Options
You can control how new members are generated in several ways.
First, you can configure a custom naming style for different members. When there's a naming style in place, ReSharper enforces its requirements when generating new members.
The rest of the options can be configured in
NotImplementedException(), returning default value, and non-compilable code.
Note on shortcuts
All keyboard shortcuts provided in this page are available in ReSharper's default "Visual Studio" keymap. For details on ReSharper's two keymaps, see ReSharper Documentation.