Marking {ReadOnly}Span with IsReadOnly attribute.
authorahsonkhan <ahson_ahmedk@yahoo.com>
Sat, 9 Sep 2017 05:23:16 +0000 (22:23 -0700)
committerahsonkhan <ahson_ahmedk@yahoo.com>
Sat, 9 Sep 2017 05:23:16 +0000 (22:23 -0700)
src/mscorlib/shared/System/ReadOnlySpan.cs
src/mscorlib/shared/System/Span.cs

index 1f00208..bfb3498 100644 (file)
@@ -15,6 +15,7 @@ namespace System
     /// ReadOnlySpan represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed
     /// or native memory, or to memory allocated on the stack. It is type- and memory-safe.
     /// </summary>
+    [IsReadOnly]
     [IsByRefLike]
     public struct ReadOnlySpan<T>
     {
index 2c46793..99fd68d 100644 (file)
@@ -22,6 +22,7 @@ namespace System
     /// Span represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed
     /// or native memory, or to memory allocated on the stack. It is type- and memory-safe.
     /// </summary>
+    [IsReadOnly]
     [IsByRefLike]
     public struct Span<T>
     {