Add Copyright Header

Purpose

Adds a copyright comment at the file's beginning. Copyright comments are used to specify the code authorship and can include the product license.

Availability

Available when the caret is on the first line.

Usage

  1. Configure the First Name, Last Name, and Company fields on the IDE | User Info options page.
  2. Place the caret at the first line.
  3. Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu.
  4. Select Add Copyright Header from the menu.

    //-----------------------------------------------------------------------
    // <copyright file="D:\Projects\CodeRushDemo\CodeRushDemo\Program.cs" company="Developer Express Inc">
    //     Author: CodeRush User
    //     Copyright (c) Developer Express Inc. All rights reserved.
    // </copyright>
    //-----------------------------------------------------------------------
    
    using System;
    using System.Collections.Generic;
    // ...
    

The Copyright Header's text is stored in the 1-key category 's h template. Refer to the Copyright Header Configuration topic for details on how to change it.

Note

This feature is available as a part of Code Cleanup.

See Also