Are there any predefined constants in the C# compiler to detect what version of the platform is being targeted?
I can set a platform in Project options but how can I write single source for .NET 2 and .NET 3.5 ?
Edit: I really want to write some code once and be able to switch behavior with something like #if CLR_VERSION35 and then rn different configurations.
The reverse question: If I make CLR35 and CLR20 configurations is it possible to select target platform based on this? The option is not available in VS2008 and I don't know a lot about MSBUILD yet.