I have a method that has code that depends on c# 6.0. (The 6.0 new features are cool BTW!)
My co-workers may open it with an older version and be confused by the compile error or think it's a typo or syntax error. I don't want them wasting time, and I also want to CMA.
I'd like to mark the method with a marker attribute that indicates that this method uses c# 6.0.
Something like:
[LanguageVersion(6.0, "This uses a C# 6.0 (Visual Studio 2015) language feature!")]
public string MyCoolMethod() => "hello world";
Is there such an attribute in the framework? What would be the closest thing to indicate my intention?
EDIT (POSSIBLE SOLUTION):
Per user2864740's suggestion, I found a project setting under Build, Advanced Build...
...Unfortunately, Visual Studio 2010 does not recognize the C# 6.0
value of the Language Version
setting and simply thinks it's a grammar error. The Language Version of the project, as opened in Visual Studio 2010 project settings, is blanked out!
EDIT (Chosen Solution):
This is the experience someone will get if they open this class in an older IDE: