So my company is currently code based on .NET 4.5 and uses VS 2015 update 3. But I code a lot in VS 2017 .NET 4.6.1 and thought that the .NET version would keep code forced to behave the same way on two versions of VS. Not so. This is acceptable for VS 2017 full property:
private string _parm;
public string Parm
{
get => _parm;
set
{
_parm = value;
OnPropertyChanged(nameof(Parm));
}
}
In VS 2015 Update 3 it can target .NET 4.6.1 and essentially the line of:
get => _parm;
has red squiggles under it from intellisense and won't build.
Is there a simple MS documentation I just am not remembering how to Google that will explain what is allowed in syntax with one VS or the other? I am asking because I just got a new book on C# 7 and like to go with new when I can for my home projects. And I hear one of the new things that I have yet to do is well typed Tuple returns as well as inline out variable declarations: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
But is the general rule now that the .NET version is separated from the code syntax as well allowed moving forward? I am confused because I think this is the case with .NET Core 2 as well.