Skip to content

Remove virtual modifier from GetDatePart#104456

Merged
stephentoub merged 2 commits intodotnet:mainfrom
xtqqczze:GetDatePart
Jul 5, 2024
Merged

Remove virtual modifier from GetDatePart#104456
stephentoub merged 2 commits intodotnet:mainfrom
xtqqczze:GetDatePart

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
@dotnet-policy-service
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
@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