Comments for Auto-generated Code

Problem
You’d like to know how to document code that’s been generated by a tool.

Solution
Include a comment at the top of the source file that explains how the code was generated and that it shouldn’t be manually edited.

Example

//--------------------------------------------------------
// <autogenerated>
//    This code was generated by ReSharper.
//    Version: 1.1.0
//
//    Changes to this file may cause unstable behavior
//    and will be lost if the code is regenerated.
// </autogenerated>
//--------------------------------------------------------

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s