4 ms·
These days I would use ReadOnlyMemory<T> to express an immutable view of a collection. If you need LINQ on it, there's MemoryMarshal.ToEnumerable.
by zmj 6y ago
These days I would use ReadOnlyMemory<T> to express an immutable view of a collection. If you need LINQ on it, there's MemoryMarshal.ToEnumerable.