In this SO question: Why doesn't C# support the return of reference (and elsewhere on the web), I can't determine when ref return
was introduced to the .NET framework. Is it just syntax sugar?
Reason I'm asking is that many of our hosts are not installed with latest .NET framework version (still on 4.5.2) and I'm wondering how this would affect CLR backwards compatibility, runtime correctness and performance.
Also, where would I be able to find documentation on how older .NET framework handles backwards compatibility? The C# 6.0 Language specification does not seem to cover this, perhaps I'm somehow skipping this?
As mentioned in the answer you linked to (and the blog entry this answer linked to), the .NET CLR has always supported ref return
s, it's just that the C# and VB compilers did not support it.
C# 7.0 added support for reference return values, and VB 15 added partial support.
In other words: The .NET Framework version on your target system does not matter, the compiler version on your development system matters. There is no need for backwards compatibility, because, as mentioned above, the feature has been in the .NET CLR from the beginning.