Skip to main content
A newer version of this page is available. .

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