ReadOnlyCollectionBuilder<T>.ToReadOnlyCollection Method ()


Creates a ReadOnlyCollection<T> containing all of the elements of the ReadOnlyCollectionBuilder<T>, avoiding copying the elements to the new array if possible. Resets the ReadOnlyCollectionBuilder<T> after the ReadOnlyCollection<T> has been created.

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

public ReadOnlyCollection<T> ToReadOnlyCollection()

.NET Framework
Available since 4.0
Available since 4.0
Return to top