Optionally compiling a function / method

Optional compiling is useful to include additional testing or diagnostics.

In the top of the file or in the project settings create a define and use the Conditional attribute for the function / method

#define MY_DEFINE

[Conditional(“MY_DEFINEā€)]

void function()

{

}

Lastest update in May 2011, inital post in May 2011

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!