icsharpcode/ILSpy

C# language support status

dgrunwald opened this issue · 3 comments

Here we list recent C# language versions (> C# 6) and their implementation status in ILSpy. Older (completed) language versions can be found in the wiki.

  • Language features that are checked are implemented in the current master branch of ILSpy and have a minimal test suite at least.
  • Language features that are crossed out will likely never be implemented in the decompiler, either because
    • they are not reproducible from compiled binaries (e.g. constant interpolated strings, Caller info attributes),
    • or they are of limited use and would require too much work to implement in the decompiler (e.g. static and global using directives, expression bodied members).

C# 12 (VS 2022 17.8)

C# 11 (VS 2022 17.4)

C# 10 (VS 2022 17.0)

C# 9 (VS 2019 16.8)

C# 8.0 (Visual Studio 2019)

C# 7.3 (Visual Studio 2017 version 15.7)

C# 7.2 (Visual Studio 2017 version 15.4)

C# 7.1 (Visual Studio 2017 version 15.3)

C# 7.0 (Visual Studio 2017)

💡 I noticed you have nameof operator crossed out. While this is typically not possible due to lack of information in the compiler output, it would be good to support it in limited cases, such as the paramName argument for ArgumentException and derived types, which is likely to align with the name of a parameter visible in the current scope.

💡 I noticed you have Caller Info attributes crossed out. While this is typically not possible, one way it could be leveraged is intentionally omitting arguments (and allowing defaults to apply) in cases where the IL passes literal arguments which are known to align with the actual values that would be inserted by these attributes. The CallerMemberNameAttribute would work without additional considerations. If other information is desired, the #line directive could be used to set the file name and line number for the call site.

  • I assume struck-through indicates "won't implement"? Would be useful to have that info at the beginning of the issue.
  • For the "won't implement" features, a one-liner description or link to relevant issue discussing why not would be appreciated for additional context.
  • Consider ordering by langver descending (so C# 10 is at the start and 1 at the end) - very few people are going to be interested in the older versions.