From c0e2a192f856b13427ff105f49d5679fa7d6100e Mon Sep 17 00:00:00 2001 From: Megha Anand <88059806+anandmeg@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:26:31 -0800 Subject: [PATCH 1/2] Revise date and enhance Copilot prompt example Updated the date and modified the Copilot prompt example to include CSV-style input handling. --- docs/csharp/how-to/parse-strings-using-split.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/csharp/how-to/parse-strings-using-split.md b/docs/csharp/how-to/parse-strings-using-split.md index 431967e4344e1..26accdb2f7d61 100644 --- a/docs/csharp/how-to/parse-strings-using-split.md +++ b/docs/csharp/how-to/parse-strings-using-split.md @@ -1,7 +1,7 @@ --- title: "Divide strings using String.Split" description: The Split method returns an array of strings split from a set of delimiters. It's an easy way to extract substrings from a string. -ms.date: 02/18/2025 +ms.date: 12/05/2025 helpviewer_keywords: - "splitting strings [C#]" - "Split method [C#]" @@ -85,12 +85,14 @@ You can use AI tools, such as GitHub Copilot, to generate code to split strings The following text shows an example prompt for Copilot Chat: ```copilot-prompt -Generate C# code to use Split.String to split a string into substrings. -Input string is "You win some. You lose some." Delimiters are space and period. -Provide example output. +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". ``` -GitHub Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot FAQs](https://aka.ms/copilot-general-use-faqs). +Review Copilot's suggestions before applying them. + +For more information, see [Copilot FAQs](https://aka.ms/copilot-general-use-faqs). ## See also From b276ca044ed863ddb0447d4a047556c56fb07e14 Mon Sep 17 00:00:00 2001 From: Megha Anand <88059806+anandmeg@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:45:24 -0800 Subject: [PATCH 2/2] Updates --- .../types/how-to-convert-a-string-to-a-number.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/csharp/programming-guide/types/how-to-convert-a-string-to-a-number.md b/docs/csharp/programming-guide/types/how-to-convert-a-string-to-a-number.md index c577fcffee668..38ec243a54c6d 100644 --- a/docs/csharp/programming-guide/types/how-to-convert-a-string-to-a-number.md +++ b/docs/csharp/programming-guide/types/how-to-convert-a-string-to-a-number.md @@ -59,13 +59,15 @@ The following example calls the