3 ms·
Isn't Unity stuck with C# 2.0 ?
by jmnicolas 10y ago
Isn't Unity stuck with C# 2.0 ?
- zamalek 10y agoPoked around Google and it seems as though you are correct about Unity; however, C# tends to use existing MSIL features and doesn't require the BCL public key token for supporting infrastructure. You can patch in many recent features in by simply defining the types yourself. A common example of that would be: public sealed class ExtensionAttribute : Attribute { } Even async/await comprises of a convention and an interface - I haven't tried it, but in theory using the CLR 2.0 TPL should bring async/await your project. So far as I know, the feature being used for ref returns has always existed for C++/CLR so this stuff should work on CLR 2.0 (although you will need the C# 7.0 compiler).
- schnelle 10y agoNo, it supports c# 6 without dynamics but uses the 2.0 runtime. Now that mono is open source, they are updating the runtime to be current. There's a project out there that swaps the mono compiler with Roslyn and gives some nice edit and continue features for Unity.