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()

{

}

Leave a Reply

Your email address will not be published. Required fields are marked *