ImmutableArray.ToImmutableArray<TSource> Method (IEnumerable<TSource>)

 

[This topic is preliminary and is subject to change.]

Creates an immutable array from the specified collection.

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public static ImmutableArray<TSource> ToImmutableArray<TSource>(
	this IEnumerable<TSource> items
)

Parameters

items
Type: System.Collections.Generic.IEnumerable<TSource>

The collection of objects to copy to the immutable array.

Return Value

Type: System.Collections.Immutable.ImmutableArray<TSource>

An immutable array that contains the specified collection of objects.

Type Parameters

TSource

The type of elements contained in items.

Return to top
Show: