-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Consolein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
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
Wraith2, martincostello, colejohnson66, D3-LucaPiombino, kronic and 1 more
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Consolein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged