RCS1246 suggestion for Last() is not usable in .NET Framework 4.8
KavenBreton-eaton opened this issue · comments
KavenBreton-eaton commented
Product and Version Used: Roslynator 4.12.1 and .NET Framework 4.8
Steps to Reproduce:
Use the Last() method of a List object for instance.
Actual Behavior:
Suggestion is to use [^1] but this is not usable in .NET Framework 4.8. We did not want to suppress the issue since other suggestions are of use for us.
Expected Behavior:
Having either a suggestion for .NET Framework 4.8 or don't raise it for this version.
Josef Pihrt commented
Possible solution is to check if System.Index
exists.