Closed
Description
Background and motivation
Console.Write and Console.WriteLine have a bunch of overloads for writing out various data types, but none for ReadOnlySpan<char>
. We should add some purely for convenience. You can achieve the same by .ToString()
'ing them or by using Console.Out.Write*
instead, but it's just a little bit of unnecessary friction.
(I thought we already had an issue for this, but can't find it now.)
API Proposal
namespace System;
public static class Console
{
+ public static void Write(ReadOnlySpan<char> value);
+ public static void WriteLine(ReadOnlySpan<char> value);
}
API Usage
ReadOnlySpan<char> value = ...;
Console.WriteLine(value);
Alternative Designs
n/a
Risks
n/a