Open Cricle opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Previous discussion: https://github.com/dotnet/runtime/issues/425.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
Author: | Cricle |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `area-System.Runtime`, `untriaged` |
Milestone: | - |
Background and motivation
In current
Will it support call
ToString
print{1,2,3}
?In source https://source.dot.net/#System.Private.CoreLib/src/System/Array.CoreCLR.cs,156e066ecc4ccedf https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Array.cs,156e066ecc4ccedf
No override
ToString
method.API Proposal
API Usage
Will print
{ 1, 2, 3 }
In object array, will call
object.ToString()
method to be a string of elements.Alternative Designs
It will break changed for call
Array.ToString()
But generally no one uses it like this, right?
Risks
When want get array type, it only can call
Array.GetType().FullName