Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCS1246 suggestion for Last() is not usable in .NET Framework 4.8 #1450

Closed
KavenBreton-eaton opened this issue Apr 23, 2024 · 1 comment · Fixed by #1460
Closed

RCS1246 suggestion for Last() is not usable in .NET Framework 4.8 #1450

KavenBreton-eaton opened this issue Apr 23, 2024 · 1 comment · Fixed by #1460

Comments

@KavenBreton-eaton
Copy link

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.

@josefpihrt
Copy link
Collaborator

Possible solution is to check if System.Index exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants