Is it possible in C# to set such a condition that if the condition is true – compile one file; if the condition is false – compile another file?
Sort of like
#ifdef DEBUG
#include Class1.cs
#else
#include Class2.cs
#endif
Or possibly set it up in project properties.
No, it isn’t.
However, you can wrap both entire files in
#ifblocks.You might also want to look at the
[Conditional]attribute.