Επεξεργασία

Κοινή χρήση μέσω


ImmutableArray.CreateRange Method

Definition

Overloads

CreateRange<T>(IEnumerable<T>)

Creates a new ImmutableArray<T> populated with the specified items.

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg)

Initializes a new instance of the ImmutableArray<T> struct.

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg)

Initializes a new instance of the ImmutableArray<T> struct.

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>)

Initializes a new instance of the ImmutableArray<T> struct.

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>)

Initializes a new instance of the ImmutableArray<T> struct.

CreateRange<T>(IEnumerable<T>)

Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs

Creates a new ImmutableArray<T> populated with the specified items.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableArray<T> CreateRange(System::Collections::Generic::IEnumerable<T> ^ items);
public static System.Collections.Immutable.ImmutableArray<T> CreateRange<T> (System.Collections.Generic.IEnumerable<T> items);
static member CreateRange : seq<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Function CreateRange(Of T) (items As IEnumerable(Of T)) As ImmutableArray(Of T)

Type Parameters

T

The type of element stored in the array.

Parameters

items
IEnumerable<T>

The elements to add to the array.

Returns

An immutable array that contains the specified items.

Applies to

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg)

Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs

Initializes a new instance of the ImmutableArray<T> struct.

public:
generic <typename TSource, typename TArg, typename TResult>
 static System::Collections::Immutable::ImmutableArray<TResult> CreateRange(System::Collections::Immutable::ImmutableArray<TSource> items, Func<TSource, TArg, TResult> ^ selector, TArg arg);
public static System.Collections.Immutable.ImmutableArray<TResult> CreateRange<TSource,TArg,TResult> (System.Collections.Immutable.ImmutableArray<TSource> items, Func<TSource,TArg,TResult> selector, TArg arg);
static member CreateRange : System.Collections.Immutable.ImmutableArray<'Source> * Func<'Source, 'Arg, 'Result> * 'Arg -> System.Collections.Immutable.ImmutableArray<'Result>
Public Function CreateRange(Of TSource, TArg, TResult) (items As ImmutableArray(Of TSource), selector As Func(Of TSource, TArg, TResult), arg As TArg) As ImmutableArray(Of TResult)

Type Parameters

TSource

The type of element stored in the source array.

TArg

The type of argument to pass to the selector mapping function.

TResult

The type of element to store in the target array.

Parameters

items
ImmutableArray<TSource>

The source array to initialize the resulting array with.

selector
Func<TSource,TArg,TResult>

The function to apply to each element from the source array.

arg
TArg

An argument to be passed to the selector mapping function.

Returns

ImmutableArray<TResult>

An immutable array that contains the specified items.

Remarks

This overload allows efficient creation of an ImmutableArray<T> based on an existing ImmutableArray<T>, where a mapping function needs to be applied to each element from the source array.

Applies to

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg)

Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs

Initializes a new instance of the ImmutableArray<T> struct.

public:
generic <typename TSource, typename TArg, typename TResult>
 static System::Collections::Immutable::ImmutableArray<TResult> CreateRange(System::Collections::Immutable::ImmutableArray<TSource> items, int start, int length, Func<TSource, TArg, TResult> ^ selector, TArg arg);
public static System.Collections.Immutable.ImmutableArray<TResult> CreateRange<TSource,TArg,TResult> (System.Collections.Immutable.ImmutableArray<TSource> items, int start, int length, Func<TSource,TArg,TResult> selector, TArg arg);
static member CreateRange : System.Collections.Immutable.ImmutableArray<'Source> * int * int * Func<'Source, 'Arg, 'Result> * 'Arg -> System.Collections.Immutable.ImmutableArray<'Result>
Public Function CreateRange(Of TSource, TArg, TResult) (items As ImmutableArray(Of TSource), start As Integer, length As Integer, selector As Func(Of TSource, TArg, TResult), arg As TArg) As ImmutableArray(Of TResult)

Type Parameters

TSource

The type of element stored in the source array.

TArg

The type of argument to be passed to the selector mapping function.

TResult

The type of element to be stored in the target array.

Parameters

items
ImmutableArray<TSource>

The source array to initialize the resulting array with.

start
Int32

The index of the first element in the source array to include in the resulting array.

length
Int32

The number of elements from the source array to include in the resulting array.

selector
Func<TSource,TArg,TResult>

The function to apply to each element from the source array included in the resulting array.

arg
TArg

An argument to be passed to the selector mapping function.

Returns

ImmutableArray<TResult>

An immutable array that contains the specified items.

Remarks

This overload allows efficient creation of an ImmutableArray<T> based on a slice of an existing ImmutableArray<T>, where a mapping function needs to be applied to each element from the source array included in the resulting array.

Applies to

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>)

Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs

Initializes a new instance of the ImmutableArray<T> struct.

public:
generic <typename TSource, typename TResult>
 static System::Collections::Immutable::ImmutableArray<TResult> CreateRange(System::Collections::Immutable::ImmutableArray<TSource> items, Func<TSource, TResult> ^ selector);
public static System.Collections.Immutable.ImmutableArray<TResult> CreateRange<TSource,TResult> (System.Collections.Immutable.ImmutableArray<TSource> items, Func<TSource,TResult> selector);
static member CreateRange : System.Collections.Immutable.ImmutableArray<'Source> * Func<'Source, 'Result> -> System.Collections.Immutable.ImmutableArray<'Result>
Public Function CreateRange(Of TSource, TResult) (items As ImmutableArray(Of TSource), selector As Func(Of TSource, TResult)) As ImmutableArray(Of TResult)

Type Parameters

TSource

The type of element stored in the source array.

TResult

The type of element to store in the target array.

Parameters

items
ImmutableArray<TSource>

The source array to initialize the resulting array with.

selector
Func<TSource,TResult>

The function to apply to each element from the source array.

Returns

ImmutableArray<TResult>

An immutable array that contains the specified items.

Remarks

This overload allows efficient creation of an ImmutableArray<T> based on an existing ImmutableArray<T>, where a mapping function needs to be applied to each element from the source array.

Applies to

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>)

Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs
Source:
ImmutableArray.cs

Initializes a new instance of the ImmutableArray<T> struct.

public:
generic <typename TSource, typename TResult>
 static System::Collections::Immutable::ImmutableArray<TResult> CreateRange(System::Collections::Immutable::ImmutableArray<TSource> items, int start, int length, Func<TSource, TResult> ^ selector);
public static System.Collections.Immutable.ImmutableArray<TResult> CreateRange<TSource,TResult> (System.Collections.Immutable.ImmutableArray<TSource> items, int start, int length, Func<TSource,TResult> selector);
static member CreateRange : System.Collections.Immutable.ImmutableArray<'Source> * int * int * Func<'Source, 'Result> -> System.Collections.Immutable.ImmutableArray<'Result>
Public Function CreateRange(Of TSource, TResult) (items As ImmutableArray(Of TSource), start As Integer, length As Integer, selector As Func(Of TSource, TResult)) As ImmutableArray(Of TResult)

Type Parameters

TSource

The type of element stored in the source array.

TResult

The type of element to store in the target array.

Parameters

items
ImmutableArray<TSource>

The source array to initialize the resulting array with.

start
Int32

The index of the first element in the source array to include in the resulting array.

length
Int32

The number of elements from the source array to include in the resulting array.

selector
Func<TSource,TResult>

The function to apply to each element from the source array included in the resulting array.

Returns

ImmutableArray<TResult>

An immutable array that contains the specified items.

Remarks

This overload allows efficient creation of an ImmutableArray<T> based on a slice of an existing ImmutableArray<T>, where a mapping function needs to be applied to each element from the source array included in the resulting array.

Applies to