I expect that framework level updates (such as async) will not be able to be compiled to work on a lower framework, but will compiler differences (such as the foreach loop variable scope) work correctly when compiled with C# 5.0 against .net 4.0? Can anyone provide a definitive list?
Edit:
Rather than ask for a definitive list, which I take back as being a lot to ask for, would anyone be able to answer whether the compiler level changes (like foreach variable scope) will behave differently when using the C# 5.0 against an earlier framework version.
All of them. There’s nothing that really requires new runtime support – some features just require new libraries. But there’s no requirement that you compile it against the .NET 4.5 libraries – you can also provide your own implementation of the same API.
For example, add the following file to your project to enable support for async/await in .NET 4.0 projects: https://gist.github.com/1961087
I haven’t tried it with the caller info attributes, but I’m pretty sure those will work even if you define them yourself instead of using the ones coming with .NET 4.5.
The same trick works with
class ExtensionAttributein C# 3 to use extension methods with .NET 2.0, and you can even use the full LINQ-to-Objects in .NET 2.0 (LinqBridge)