Open jimmygilles opened 1 year ago
Tagging subscribers to this area: @dotnet/area-system-memory See info in area-owners.md if you want to be subscribed.
Author: | jimmygilles |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `area-System.Memory` |
Milestone: | - |
array1
should have 96 bits; array2
3 bits and array3 (there's a typo in the example) 24 bits
, isn't it?
(Sorry for the typo.) Yes, it should be 96, 3 and 24. In fact it must follow the same behaviour as the existing ones with array (int[], bool[], byte[]).
My request here is just to avoid an unnecessary "ToArray()" on the span.
Tagging subscribers to this area: @dotnet/area-system-collections See info in area-owners.md if you want to be subscribed.
Author: | jimmygilles |
---|---|
Assignees: | - |
Labels: | `api-suggestion`, `area-System.Collections`, `untriaged` |
Milestone: | - |
Background and motivation
Hello,
The System.Collection.BitArray has a constructor that accepts an array of boolean, byte or int. As we now have
ReadOnlySpan<byte>
,ReadOnlySpan<bool>
andReadOnlySpan<int>
, that would be great to add three new constructors to accept these span.Currently we must do a ".ToArray" on the span.
API Proposal
API Usage
Alternative Designs
No response
Risks
No response