Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateRange< T >()

static ImmutableArray< T > System.Collections.Immutable.ImmutableArray< T >.CreateRange< T > ( IEnumerable< T > items)
inlinestatic

Definition at line 43 of file ImmutableArray.cs.

44 {
45 Requires.NotNull(items, "items");
46 if (items is IImmutableArray immutableArray)
47 {
49 if (array == null)
50 {
52 }
53 return new ImmutableArray<T>((T[])array);
54 }
55 if (items.TryGetCount(out var count))
56 {
57 return new ImmutableArray<T>(items.ToArray(count));
58 }
59 return new ImmutableArray<T>(items.ToArray());
60 }
static string InvalidOperationOnDefaultArray
Definition SR.cs:32
Definition SR.cs:7

References System.Collections.Immutable.ImmutableArray< T >.array, System.count, and System.SR.InvalidOperationOnDefaultArray.