Yes, the method itself is still built, but you are compiling.
This is completely logical - since the point Conditionalshould depend on the symbols of the preprocessor defined when creating the caller, and not when building the called party.
A simple test - build this:
using System;
using System.Diagnostics;
class Test
{
[Conditional("FOO")]
static void CallMe()
{
Console.WriteLine("Called");
}
static void Main()
{
CallMe();
}
}
( FOO), , , Reflector, , .
, , .NET (, ) DEBUG? ( , !), Debug.Assert ..?
, , , , , , .