Skip to content

Conversation

@anandmeg
Copy link
Contributor

@anandmeg anandmeg commented Dec 4, 2025

Updated the date and modified the Copilot prompt example to include CSV-style input handling.
Copilot AI review requested due to automatic review settings December 4, 2025 23:26
@anandmeg anandmeg requested review from a team and BillWagner as code owners December 4, 2025 23:26
@dotnetrepoman dotnetrepoman bot added this to the December 2025 milestone Dec 4, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc fundamentals/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Dec 4, 2025
Copilot finished reviewing on behalf of anandmeg December 4, 2025 23:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR revises the AI prompt example in the C# documentation for string splitting using String.Split. The changes improve the example by using a more realistic CSV-style parsing scenario instead of a simpler sentence-splitting example.

Key changes:

  • Updated the ms.date metadata field
  • Revised the Copilot prompt example to demonstrate CSV parsing with multiple delimiters and whitespace handling
  • Improved the disclaimer text by splitting it into clearer, more actionable guidance

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.

Hi @anandmeg
I had a couple comments, and then this is ready.

Comment on lines +88 to +90
Generate C# code to split a CSV-style input string containing values, where entries may be separated by commas or semicolons and may contain extra whitespace.
Remove any empty values and trim whitespace from the results.
Show example output for the string: " apples, oranges ; bananas, , ;pears".
Copy link
Member

Choose a reason for hiding this comment

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

This is an opinion, but I like the earlier example better, possibly to split a paragraph into distinct sentences using sentence ending punctuation for delimiters: ., ?, and !, and trimming additional whitespace.

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

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc fundamentals/subsvc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants