Language Style for C# Comments

Problem
You’re interested in a recommended language style for code comments.

Solution
Favor an imperative style. An imperative style means that comments sound like commands you give to the code. For example: “Evaluate the button exists.”

Additional Comments
Alternatively, a descriptive style can be used. A descriptive style expresses what the code is doing. For example: “Evaluates the button exists.” One style sounds like a command, and the other describes what’s happening. Be consistent regardless of the style chosen. Otherwise, your comments may cause confusion.

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