Memory<T> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Memory<T>(T[]) |
Creates a new Memory<T> object over the entirety of a specified array. |
Memory<T>(T[], Int32, Int32) |
Creates a new Memory<T> object that includes a specified number of elements of an array beginning at a specified index. |
Memory<T>(T[])
- Source:
- Memory.cs
- Source:
- Memory.cs
- Source:
- Memory.cs
Creates a new Memory<T> object over the entirety of a specified array.
public:
Memory(cli::array <T> ^ array);
public Memory (T[]? array);
public Memory (T[] array);
new Memory<'T> : 'T[] -> Memory<'T>
Public Sub New (array As T())
Parameters
- array
- T[]
The array from which to create the Memory<T> object.
Exceptions
Remarks
If array
is null
, this constructor returns a Memory<T> object with a default<T>
value.
Applies to
Memory<T>(T[], Int32, Int32)
- Source:
- Memory.cs
- Source:
- Memory.cs
- Source:
- Memory.cs
Creates a new Memory<T> object that includes a specified number of elements of an array beginning at a specified index.
public:
Memory(cli::array <T> ^ array, int start, int length);
public Memory (T[]? array, int start, int length);
public Memory (T[] array, int start, int length);
new Memory<'T> : 'T[] * int * int -> Memory<'T>
Public Sub New (array As T(), start As Integer, length As Integer)
Parameters
- array
- T[]
The source array.
Exceptions
array
is null
, but start
or length
is non-zero.
-or-
start
is outside the bounds of the array.
-or-
start
and length
exceeds the number of elements in the array.
T
is a reference type, and array
is not an array of type T
.
Remarks
If array
is null
, this constructor returns a Memory<T> object with a default<T>
value.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기