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

◆ AsMemory< T >() [5/8]

static Memory< T > System.MemoryExtensions.AsMemory< T > ( this T?[] array,
Index startIndex )
inlinestatic

Definition at line 1094 of file MemoryExtensions.cs.

1095 {
1096 if (array == null)
1097 {
1098 if (!startIndex.Equals(Index.Start))
1099 {
1100 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
1101 }
1102 return default(Memory<T>);
1103 }
1104 int offset = startIndex.GetOffset(array.Length);
1105 return new Memory<T>(array, offset);
1106 }

References System.array, System.offset, System.Index.Start, System.startIndex, and System.ThrowHelper.ThrowArgumentNullException().