diff --git a/docs/csharp/how-to/parse-strings-using-split.md b/docs/csharp/how-to/parse-strings-using-split.md index 431967e4344e1..faf338ace06e9 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,16 @@ 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 parse and split CSV-style data from user input or external export that isn't well formed. +The input string may contain mixed delimiters (commas, semicolons), inconsistent spacing and empty entries. +Parse the string: accept all valid separators, remove any empty values and trim whitespace from all entries. +Return a clean list of values. +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 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