Is it possible to check for the C# version from code in maybe the environment settings?
I would like to use #if
preprocessor directive to selectively choose what version to compile for. The reason being is that sometimes we will ship source code examples and if the end user is using an older IDE which might not support for example c#6.0, the compilation fails and causes loss of time from both sides. I would like to resolve this and provide just one source which does selective compilation based on what might be supported.
Based on some reading online, I can't seemt to find any resource on this? Has anyone else tried to do something similar?