All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Declare Partial Class Part

Purpose

Creates a class part in a new file and makes the current class partial, if required.

Availability

Available when the cursor is in a class or partial class.

How to Use

  1. 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() { }
    }
}
  1. Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.

    RemoveVariable

  2. 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.

RemoveVariable