VERSION Compilation Constant

Problem
You want an easy way to include or exclude portions of code in different versions of a project.

Solution
Define a compilation constant named VERSIONxyy, where x and yy are the project’s major and minor version numbers, respectively.

Comments
Custom compilation constants like this can be set on the Build tab of the Project Properties page.

#if VERSION110 || VERSION120
    // Include code for version 1.10 and 1.20 here.
    // ...
#endif

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