ImmutableArray<T>.Builder.DrainToImmutable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the current contents as an ImmutableArray<T> and sets the collection to a zero length array.
public:
System::Collections::Immutable::ImmutableArray<T> DrainToImmutable();
public System.Collections.Immutable.ImmutableArray<T> DrainToImmutable ();
member this.DrainToImmutable : unit -> System.Collections.Immutable.ImmutableArray<'T>
Public Function DrainToImmutable () As ImmutableArray(Of T)
Returns
An immutable array.
Remarks
If Capacity equals Count, the internal array will be extracted as an ImmutableArray<T> without copying the contents. Otherwise, the contents will be copied into a new array. The collection will then be set to a zero length array.
Applies to
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.