voidstar69 commented on code in PR #41539:
URL: https://github.com/apache/arrow/pull/41539#discussion_r1597479356


##########
csharp/src/Apache.Arrow/Arrays/PrimitiveArray.cs:
##########
@@ -86,5 +86,30 @@ IEnumerator IEnumerable.GetEnumerator()
                 yield return IsValid(index) ? Values[index] : null;
             }
         }
+
+        int ICollection<T?>.Count => Length;
+        bool ICollection<T?>.IsReadOnly => true;
+        void ICollection<T?>.Add(T? item) => throw new 
NotSupportedException("Collection is read-only.");
+        bool ICollection<T?>.Remove(T? item) => throw new 
NotSupportedException("Collection is read-only.");
+        void ICollection<T?>.Clear() => throw new 
NotSupportedException("Collection is read-only.");
+
+        bool ICollection<T?>.Contains(T? item)

Review Comment:
   Using `ReadOnlySpan<T>.IndexOf` requires that the type `T` implements 
`IEquatable<T>`. Is this restriction desirable?
   I tried to add this type constraint on line 24, but I could not get this 
constraint to coexist with the constraint that `T` be a `struct`. I might just 
have got the wrong syntax for this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to