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

Remove virtual modifier from GetDatePart #104456

Merged
merged 2 commits into from
Jul 5, 2024
Merged

Conversation

xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Jul 4, 2024

The GetDatePart method in derived classes of System.Globalization.Calendar has no overrides therefore the virtual modifier is unnecessary.

Additionally make these methods private, and static where possible.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 4, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@xtqqczze xtqqczze marked this pull request as ready for review July 5, 2024 12:29
@xtqqczze
Copy link
Contributor Author

xtqqczze commented Jul 5, 2024

@stephentoub Thanks for fixing CA1822: Member 'GetDatePart' does not access instance data and can be marked as static in 5d82c8a.

@stephentoub stephentoub merged commit c52177b into dotnet:main Jul 5, 2024
144 of 146 checks passed
@xtqqczze xtqqczze deleted the GetDatePart branch July 5, 2024 13:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants