C# Compiler Warnings

You want to catch as many issues as possible with your programs at compile time.

A best practice is to compile with Warning Level 4; don’t suppress warnings. Enable the Treat Warnings As Errors option for Release mode.

Treating warnings as errors is a great way to spot problems in your code. You may even want to turn this feature on for Debug mode. To set these options, right-click your project in Solution Explorer, choose Properties, and go to the Build page. Use the /warnaserror+ option if compiling from the command line.

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