Skip to content

Fix date typos and terminology in default interface methods tutorial #47375

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 15, 2025

This PR addresses minor issues in the default interface methods tutorial documentation and code examples:

Changes Made

1. Fixed Date Typos in Code Examples

  • Changed new DateTime(1012, 11, 15)new DateTime(2012, 11, 15) (anniversary date)
  • Changed new DateTime(2103, 7, 4)new DateTime(2013, 7, 4) (order date)

These corrections were applied to both the starter and finished project examples to ensure consistency and realistic date values.

2. Improved Technical Terminology

  • Changed "That cast from SampleCustomer to ICustomer is necessary" → "That implicit conversion from SampleCustomer to ICustomer is necessary"

This better describes the actual C# language feature being demonstrated. The code ICustomer theCustomer = c; performs an implicit conversion, not an explicit cast operation.

Validation

  • ✅ Both code projects compile successfully with .NET 8.0
  • ✅ Both code projects run without errors and display corrected dates
  • ✅ Changes are minimal and surgical - only addressing the specific issues raised

The corrected dates now show logical chronological progression (anniversary in 2012, order in 2013) instead of the obviously incorrect years (1012, 2103).

Fixes #26862.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/csharp/advanced-topics/interface-implementation/default-interface-methods-versions.md docs/csharp/advanced-topics/interface-implementation/default-interface-methods-versions

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Jul 15, 2025
@Copilot Copilot AI changed the title [WIP] Minor nits in example and explanation Fix date typos and terminology in default interface methods tutorial Jul 15, 2025
@Copilot Copilot AI requested a review from BillWagner July 15, 2025 15:14
Copilot finished work on behalf of BillWagner July 15, 2025 15:14
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything here looks great. I'll mark it ready for final review.

@BillWagner BillWagner marked this pull request as ready for review July 16, 2025 14:53
@BillWagner BillWagner requested a review from a team as a code owner July 16, 2025 14:53
@BillWagner BillWagner requested a review from IEvangelist July 16, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-csharp/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minor nits in example and explanation
2 participants