Copyright Notice Code Snippet

Are you tired of copy/pasting Copyright notice from one file to another? It requires you to context switch to another file, select and copy the notice, come back to the desired file and paste it. I have built a code snippet that can add the copyright notice to your file with a few keystrokes. Effectively it makes that “legal” task easier and more productive for the developers.

This post explains how to do one time set up and how to use it later with ease.

One time setup

ImportStep1

  • When the dialog comes up
    • Select CSharp language
    • Click the Import button

ImportStep2-3

      • Choose the file that you saved in Step
      • The remaining steps are self-explanatory.

You are done with the one time set up.

How to use it

In your .cs file:

        • Type #cp

      UseInFile

      • Tab twice. And the notice will appear.

UseInFile2

If the notice is not formatted to your satisfaction, you can make changes to the snippet file that you created in the setup and import it again.

Unknown's avatar

Published by: Sameer Khandekar

I am a passionate software engineer who loves to work on Azure microservices, REST API, SDKs, and .NET apps using WPF, Xamarin, and MAUI. The work includes highly scalable geo-distributed services and an authentication library with nearly 500 million downloads. I also had fun integrating with hardware using Bluetooth (BLE). More here: https://www.sameer.blog/about/

Categories Visual StudioTags, , Leave a comment

Leave a comment