Declare Partial Class Part
Purpose
Creates a class part in a new file and makes the current class partial, if required. You can also use this refactoring in records.
Availability
Available when the cursor is in a class or partial class.
How to Use
- Place the caret in a class or partial class.
Note
The blinking cursor shows the caret’s position where Refactoring is available.
using NUnit.Framework;
namespace NunitTestProject {
[TestFixture]
public │class Tests {
[Test]
public void Test() { }
}
}
Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
Select Declare Partial Class Part from the menu.
After execution, the Refactoring makes the current class partial, if required and creates a file with the new part of this class.