You are using wrong tool to achieve this. Conditional compilation symbols are utilized while compilation and not at run time. You probably need a facade here. In the DLL, you should have something like this:
public enum ProcessFlag
{
Flag1,
Flag2,
Flag3,
Flag4,
Flag5,
}
public class DLLClass
{
public void SomeMethod(ProcessFlag flag)
{
switch (flag)
{
case ProcessFlag.Flag1:
ProcessFlag1();
break;
case ProcessFlag.Flag2:
ProcessFlag2();
break;
case ProcessFlag.Flag3:
ProcessFlag3();
break;
case ProcessFlag.Flag4:
ProcessFlag4();
break;
case ProcessFlag.Flag5:
ProcessFlag5();
break;
default:
ProcessFlagDefault();
break;
}
}
private void ProcessFlagDefault()
{
throw new NotImplementedException();
}
private void ProcessFlag5()
{
throw new NotImplementedException();
}
private void ProcessFlag4()
{
throw new NotImplementedException();
}
private void ProcessFlag3()
{
throw new NotImplementedException();
}
private void ProcessFlag2()
{
throw new NotImplementedException();
}
private void ProcessFlag1()
{
throw new NotImplementedException();
}
}
In the application you can then provide a particular flag to do specific processing.