diff options
author | Ian Hays <ianha@microsoft.com> | 2018-01-30 12:56:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-30 12:56:11 -0800 |
commit | 8a9c59260b8cc04d266e021229f4b044bf40ad52 (patch) | |
tree | b9f18de7ec2361ec5704a2e698c854e4c8c8c90b | |
parent | 51c63b16bafe1f3f34e7f47dc12f722ebee4d432 (diff) | |
parent | d634e8cb9a900c6d9410cc9f17bc96be06b1669c (diff) | |
download | coreclr-8a9c59260b8cc04d266e021229f4b044bf40ad52.tar.gz coreclr-8a9c59260b8cc04d266e021229f4b044bf40ad52.tar.bz2 coreclr-8a9c59260b8cc04d266e021229f4b044bf40ad52.zip |
Merge pull request #16087 from ianhays/span_strings
Update Span/ReadOnlySpan strings to match Portable Span
-rw-r--r-- | src/mscorlib/shared/System/ReadOnlySpan.cs | 5 | ||||
-rw-r--r-- | src/mscorlib/shared/System/Span.cs | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/mscorlib/shared/System/ReadOnlySpan.cs b/src/mscorlib/shared/System/ReadOnlySpan.cs index 4ee07a789b..063732b12d 100644 --- a/src/mscorlib/shared/System/ReadOnlySpan.cs +++ b/src/mscorlib/shared/System/ReadOnlySpan.cs @@ -125,9 +125,6 @@ namespace System _length = length; } - //Debugger Display = {T[length]} - private string DebuggerDisplay => string.Format("{{{0}[{1}]}}", typeof(T).Name, _length); - /// <summary> /// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to the location where the 0th element /// would have been stored. Such a reference can be used for pinning but must never be dereferenced. @@ -280,7 +277,7 @@ namespace System /// <summary> /// Returns a <see cref="String"/> with the name of the type and the number of elements /// </summary> - public override string ToString() => "System.Span[" + Length.ToString() + "]"; + public override string ToString() => string.Format("System.ReadOnlySpan<{0}>[{1}]", typeof(T).Name, _length); /// <summary> /// Defines an implicit conversion of an array to a <see cref="ReadOnlySpan{T}"/> diff --git a/src/mscorlib/shared/System/Span.cs b/src/mscorlib/shared/System/Span.cs index 851e6fe7d8..d96f4b142b 100644 --- a/src/mscorlib/shared/System/Span.cs +++ b/src/mscorlib/shared/System/Span.cs @@ -131,9 +131,6 @@ namespace System _length = length; } - //Debugger Display = {T[length]} - private string DebuggerDisplay => string.Format("{{{0}[{1}]}}", typeof(T).Name, _length); - /// <summary> /// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to the location where the 0th element /// would have been stored. Such a reference can be used for pinning but must never be dereferenced. @@ -355,7 +352,7 @@ namespace System /// <summary> /// Returns a <see cref="String"/> with the name of the type and the number of elements /// </summary> - public override string ToString() => "System.Span[" + Length.ToString() + "]"; + public override string ToString() => string.Format("System.Span<{0}>[{1}]", typeof(T).Name, _length); /// <summary> /// Defines an implicit conversion of an array to a <see cref="Span{T}"/> |