Add Copyright Header
- 2 minutes to read
Purpose
Adds a copyright comment at the file’s beginning.
Availability
Available when the caret is in the first line of a source code file.
How to Use
Select the CodeRush | Options… item in the Visual Studio’s menu and open the IDE | User Info options page.
Configure the First Name, Last Name, and Company fields on the User Info options page.
Open a source code file.
Place the caret at the first line.
Use the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions Menu and select Add Copyright Header from the menu.
After execution, the Code Provider adds a copyright comment.
//-----------------------------------------------------------------------
// <copyright file="D:\Projects\CodeRushDemo\CodeRushDemo\Program.cs" company="Developer Express">
// Author: CodeRush User
// Copyright (c) Developer Express. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
// ...
You can also use the h template to add the Copyright Header‘s text. Refer to the Copyright Header topic for details.
Note
This feature is available as a part of Code Cleanup.
See Also