Skip to content

Commit e5c631d

Browse files
authored
Improve ArraySegment debugging (#90488)
1 parent cf9bb86 commit e5c631d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libraries/System.Private.CoreLib/src/System/ArraySegment.cs

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ namespace System
1919
// (ie, users could assign a new value to the old location).
2020
[Serializable]
2121
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
22+
[DebuggerTypeProxy(typeof(ICollectionDebugView<>))]
23+
[DebuggerDisplay("Count = {Count}")]
2224
#pragma warning disable CA1066 // adding IEquatable<T> implementation could change semantics of code like that in xunit that queries for IEquatable vs enumerating contents
2325
public readonly struct ArraySegment<T> : IList<T>, IReadOnlyList<T>
2426
#pragma warning restore CA1066

0 commit comments

Comments
 (0)