Reputation: 12441
Is there a way to see what conditional compilation symbols were set during runtime or is this information lost at compile time?
Upvotes: 1
Views: 100
Reputation: 941347
Other than side effects they may have, no, there's nothing in the metadata for it. They only have an affect at compile time. Easy enough to make it have such a side effect, you could wrap a dummy class with it and then at runtime use Reflection to see if it's there.
#if TRACE
public static class TraceWasEnabled {}
#endif
Upvotes: 2