System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<T>.ToReadOnlyCollection Method

Creates a System.Collections.ObjectModel.ReadOnlyCollection`1 containing all of the elements of the System.Runtime.CompilerServices.ReadOnlyCollectionBuilder`1, avoiding copying the elements to the new array if possible. Resets the System.Runtime.CompilerServices.ReadOnlyCollectionBuilder`1 after the System.Collections.ObjectModel.ReadOnlyCollection`1 has been created.

Syntax

public System.Collections.ObjectModel.ReadOnlyCollection<T> ToReadOnlyCollection ()

Returns

A new instance of System.Collections.ObjectModel.ReadOnlyCollection`1.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 4.0.0.0