C# VS 2008 Build Configurations - using different classes for different builds
- by evan
I'm writing an application which has two classes that provide basically the same functionality but for different situations. I'd like to have three versions of the software - one where the user can change an ini file to configure the program to use one of the two classes, and then one version that only uses one of the two classes.
Right now I have it working via an ini file, but I'd like to be able to build versions that don't include the code for the unneeded class at all.
What is the best way to go about this? My current line of thinking is that since both classes derive from a common interface I'll just add a compile time conditional that looks at the active build configuration and decides whether to compile that class. What is the syntax to do that?
Thanks in advance for your help and input!