Closed Chris3606 closed 2 years ago
Note: A second (potentially better) possibility might be to remove the ISettableGridView.Fill
extension method, and make it a default interface method instead, so that the derived types themselves can override it. However, this may be impossible to accomplish without a (very minor) breaking change to the API.
ISettableGridView.Fill
handlesArrayView
like any other grid view, by simply setting the elements using the indexers. This is functional, but very inefficient if the type is actually an ArrayView;Array.Fill
(orArray.Clear
in the case that the value being filled is the default one) is much faster in these cases.Ideally, the .Fill extension method could do similar special-case logic as
BitArray
to gain this efficiency, since the performance gains can be quite substantial (well worth the cost of the cast).