Can I make a preprocessor directive dependent on the .NET framework version?
Here's a concrete example of what I want to do. Consider the string.Join function. Pre-.NET 4.0, there were only two overloads, both of which required a string[] parameter. As of .NET 4.0, there are new overloads taking more flexible parameter types, including IEnumerable<string> . I have a library which includes a Join function that does essentially what the .NET 4.0 string.Join function does. I was just wondering if I could make this function's implementation dependent on the .NET framework being targeted. If 4.0, it could simply call string.Join internally. If 3.5 or older, it could call