Skip to content

Respond to feedback (fast follow) #11649

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

Merged
merged 1 commit into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions snippets/csharp/System/String/IndexOfAny/IndexOfAny1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ public static void Run()
char[] chars = { 'a', 'e', 'i', 'o', 'u', 'y',
'A', 'E', 'I', 'O', 'U', 'Y' };
String s = "The long and winding road...";
Console.WriteLine($"The first vowel in \n {s}\n" +
$"is found at index {s.IndexOfAny(chars)}");
Console.WriteLine($"""
The first vowel in
'{s}'
is found at index {s.IndexOfAny(chars)}
""");

// The example displays the following output:
// The first vowel in
// The long and winding road...
// 'The long and winding road...'
// is found at index 2
// </Snippet1>
}
Expand Down
6 changes: 4 additions & 2 deletions snippets/csharp/System/String/IndexOfAny/ixany2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ public static void Run()
Console.WriteLine();
Console.WriteLine("The first character occurrence " +
$"from position {start} to {str.Length - 1}:");
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}" +
$"{br2}{Environment.NewLine}{str}{Environment.NewLine}");
Console.WriteLine($"""
{Environment.NewLine}{br1}{Environment.NewLine}
{br2}{Environment.NewLine}{str}{Environment.NewLine}
""");
Console.Write($"A character in '{target}' occurs at position: ");

at = str.IndexOfAny(anyOf, start);
Expand Down
6 changes: 4 additions & 2 deletions snippets/csharp/System/String/IndexOfAny/ixany3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ public static void Run()
Console.WriteLine();
Console.WriteLine("The first character occurrence from " +
$"position {start} for {count} characters:");
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}{br2}" +
$"{Environment.NewLine}{str}{Environment.NewLine}");
Console.WriteLine($"""
{Environment.NewLine}{br1}{Environment.NewLine}{br2}
{Environment.NewLine}{str}{Environment.NewLine}
""");
Console.Write($"A character in '{target}' occurs at position: ");

int at = str.IndexOfAny(anyOf, start, count);
Expand Down