Open Youssef1313 opened 4 years ago
I like this idea as well @Youssef1313
Would you like to work on it?
Related to dotnet/dotnet-api-docs#4309.
I have added code to illustrate the usage of int32
in String.Split
overloads. The code was added in https://github.com/dotnet/docs/pull/39850 but since Try.NET doesn't support it as of this writing, and I think interactivity is a good fit for that page, I'm holding the text I wrote out of the article.
When somebody revisits this issue at some future time, my suggestion is to add the following markdown just before the ## See Also
:
Some overloads of the <xref:System.String.Split%2A?displayProperty=nameWithType> method allow you to limit the number of substrings returned in the array. This example limits the number of substrings to four, so it returns the first three words as the first three elements of the array, and the rest of the string as the fourth element.
:::code language="csharp" interactive="try-dotnet-method" source="../../../samples/snippets/csharp/how-to/strings/ParseStringsUsingSplit.cs" id="Snippet6":::
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 226914