| 47 | /// </summary> |
| 48 | /// <param name="capacity">The number of elements that can be added without a need to allocate more memory.</param> |
| 49 | explicit BitArray(const int32 capacity) |
| 50 | : _count(0) |
| 51 | , _capacity(capacity) |
| 52 | { |
| 53 | if (capacity > 0) |
| 54 | _allocation.Allocate(ToItemCapacity(capacity)); |
| 55 | } |
| 56 | |
| 57 | /// <summary> |
| 58 | /// Initializes <see cref="BitArray"/> by copying the elements from the other collection. |