MemoryExtensions.AsMemory Metoda

Definice

Přetížení

AsMemory(String)

Vytvoří novou ReadOnlyMemory<Char> část cílového řetězce.

AsMemory(String, Index)

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadaném indexu.

AsMemory(String, Int32)

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadané pozici znaku.

AsMemory(String, Range)

Vytvoří nový ReadOnlyMemory<Char> v zadaném rozsahu cílového řetězce.

AsMemory(String, Int32, Int32)

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadané pozici o délce.

AsMemory<T>(ArraySegment<T>)

Vytvoří novou oblast paměti nad částí cílového segmentu pole.

AsMemory<T>(T[])

Vytvoří novou oblast paměti nad cílovým polem.

AsMemory<T>(ArraySegment<T>, Int32)

Vytvoří novou oblast paměti nad částí cílového segmentu pole počínaje zadanou pozicí na konci segmentu.

AsMemory<T>(T[], Index)

Vytvoří novou oblast paměti nad částí cílového pole počínaje zadaným indexem na konec pole.

AsMemory<T>(T[], Int32)

Vytvoří novou oblast paměti nad částí cílového pole počínaje zadanou pozicí na konec pole.

AsMemory<T>(T[], Range)

Vytvoří novou oblast paměti nad částí cílového pole počínaje inkluzivním počátečním indexem oblasti a končící výhradním koncovým indexem rozsahu.

AsMemory<T>(ArraySegment<T>, Int32, Int32)

Vytvoří novou oblast paměti nad částí cílového segmentu pole začínající na zadané pozici se zadanou délkou.

AsMemory<T>(T[], Int32, Int32)

Vytvoří novou oblast paměti nad částí cílového pole začínající na zadané pozici se zadanou délkou.

AsMemory(String)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou ReadOnlyMemory<Char> část cílového řetězce.

public:
[System::Runtime::CompilerServices::Extension]
 static ReadOnlyMemory<char> AsMemory(System::String ^ text);
public static ReadOnlyMemory<char> AsMemory (this string? text);
public static ReadOnlyMemory<char> AsMemory (this string text);
static member AsMemory : string -> ReadOnlyMemory<char>
<Extension()>
Public Function AsMemory (text As String) As ReadOnlyMemory(Of Char)

Parametry

text
String

Cílový řetězec.

Návraty

Reprezentace řetězce ve znakové paměti jen pro čtení, nebo default pokud text je null.

Poznámky

Vrátí výchozí hodnotu, pokud text je nullhodnota .

Platí pro

AsMemory(String, Index)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadaném indexu.

public:
[System::Runtime::CompilerServices::Extension]
 static ReadOnlyMemory<char> AsMemory(System::String ^ text, Index startIndex);
public static ReadOnlyMemory<char> AsMemory (this string? text, Index startIndex);
public static ReadOnlyMemory<char> AsMemory (this string text, Index startIndex);
static member AsMemory : string * Index -> ReadOnlyMemory<char>
<Extension()>
Public Function AsMemory (text As String, startIndex As Index) As ReadOnlyMemory(Of Char)

Parametry

text
String

Cílový řetězec.

startIndex
Index

Index, od kterého má tato řez začít.

Návraty

Reprezentace řetězce ve znakové paměti jen pro čtení.

Platí pro

AsMemory(String, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadané pozici znaku.

public:
[System::Runtime::CompilerServices::Extension]
 static ReadOnlyMemory<char> AsMemory(System::String ^ text, int start);
public static ReadOnlyMemory<char> AsMemory (this string? text, int start);
public static ReadOnlyMemory<char> AsMemory (this string text, int start);
static member AsMemory : string * int -> ReadOnlyMemory<char>
<Extension()>
Public Function AsMemory (text As String, start As Integer) As ReadOnlyMemory(Of Char)

Parametry

text
String

Cílový řetězec.

start
Int32

Index, od kterého má tato řez začít.

Návraty

Reprezentace řetězce ve znakové paměti jen pro čtení, nebo default pokud text je null.

Výjimky

startnení v rozsahu ( je 0 nebo >text.Length).<starttext

Poznámky

Vrátí výchozí hodnotu, pokud text je nullhodnota .

Platí pro

AsMemory(String, Range)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří nový ReadOnlyMemory<Char> v zadaném rozsahu cílového řetězce.

public:
[System::Runtime::CompilerServices::Extension]
 static ReadOnlyMemory<char> AsMemory(System::String ^ text, Range range);
public static ReadOnlyMemory<char> AsMemory (this string? text, Range range);
public static ReadOnlyMemory<char> AsMemory (this string text, Range range);
static member AsMemory : string * Range -> ReadOnlyMemory<char>
<Extension()>
Public Function AsMemory (text As String, range As Range) As ReadOnlyMemory(Of Char)

Parametry

text
String

Cílový řetězec.

range
Range

Rozsah, který určuje začátek a délku řezného řetězce.

Návraty

Reprezentace řetězce ve znakové paměti jen pro čtení.

Platí pro

AsMemory(String, Int32, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří nový ReadOnlyMemory<Char> přes část cílového řetězce začínající na zadané pozici o délce.

public:
[System::Runtime::CompilerServices::Extension]
 static ReadOnlyMemory<char> AsMemory(System::String ^ text, int start, int length);
public static ReadOnlyMemory<char> AsMemory (this string? text, int start, int length);
public static ReadOnlyMemory<char> AsMemory (this string text, int start, int length);
static member AsMemory : string * int * int -> ReadOnlyMemory<char>
<Extension()>
Public Function AsMemory (text As String, start As Integer, length As Integer) As ReadOnlyMemory(Of Char)

Parametry

text
String

Cílový řetězec.

start
Int32

Index, od kterého má tato řez začít.

length
Int32

Požadovaná délka řezu

Návraty

Reprezentace řetězce ve znakové paměti jen pro čtení, nebo default pokud text je null.

Výjimky

start, lengthnebolengthstart + není v rozsahu .text

Poznámky

Vrátí výchozí hodnotu, pokud text je nullhodnota .

Platí pro

AsMemory<T>(ArraySegment<T>)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového segmentu pole.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(ArraySegment<T> segment);
public static Memory<T> AsMemory<T> (this ArraySegment<T> segment);
static member AsMemory : ArraySegment<'T> -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (segment As ArraySegment(Of T)) As Memory(Of T)

Parametry typu

T

Typ segmentu.

Parametry

segment
ArraySegment<T>

Segment, který chcete převést.

Návraty

Paměťová reprezentace segmentu.

Platí pro

AsMemory<T>(T[])

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad cílovým polem.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(cli::array <T> ^ array);
public static Memory<T> AsMemory<T> (this T[]? array);
public static Memory<T> AsMemory<T> (this T[] array);
static member AsMemory : 'T[] -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (array As T()) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

array
T[]

Pole, které se má převést.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Platí pro

AsMemory<T>(ArraySegment<T>, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového segmentu pole počínaje zadanou pozicí na konci segmentu.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(ArraySegment<T> segment, int start);
public static Memory<T> AsMemory<T> (this ArraySegment<T> segment, int start);
static member AsMemory : ArraySegment<'T> * int -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (segment As ArraySegment(Of T), start As Integer) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

segment
ArraySegment<T>

Cílový segment pole.

start
Int32

Index, ve kterém má začít paměť.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Výjimky

segment je kovariantní a typ segment není přesně T[].

start je menší než 0 nebo větší než segment.Count.

Poznámky

Vrátí hodnotu default , když segment je nullhodnota .

Platí pro

AsMemory<T>(T[], Index)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového pole počínaje zadaným indexem na konec pole.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(cli::array <T> ^ array, Index startIndex);
public static Memory<T> AsMemory<T> (this T[]? array, Index startIndex);
public static Memory<T> AsMemory<T> (this T[] array, Index startIndex);
static member AsMemory : 'T[] * Index -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (array As T(), startIndex As Index) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

array
T[]

Pole, které se má převést.

startIndex
Index

První pozice pole.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Platí pro

AsMemory<T>(T[], Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového pole počínaje zadanou pozicí na konec pole.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(cli::array <T> ^ array, int start);
public static Memory<T> AsMemory<T> (this T[]? array, int start);
public static Memory<T> AsMemory<T> (this T[] array, int start);
static member AsMemory : 'T[] * int -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (array As T(), start As Integer) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

array
T[]

Cílové pole.

start
Int32

Index, ve kterém má začít paměť.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Výjimky

array je kovariantní a typ pole není přesně T[].

start index menší než 0 nebo větší než array.Length.

Poznámky

Vrátí hodnotu default , když array je nullhodnota .

Platí pro

AsMemory<T>(T[], Range)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového pole počínaje inkluzivním počátečním indexem oblasti a končící výhradním koncovým indexem rozsahu.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(cli::array <T> ^ array, Range range);
public static Memory<T> AsMemory<T> (this T[]? array, Range range);
public static Memory<T> AsMemory<T> (this T[] array, Range range);
static member AsMemory : 'T[] * Range -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (array As T(), range As Range) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

array
T[]

Pole, které se má převést.

range
Range

Oblast, která se má převést z pole.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Platí pro

AsMemory<T>(ArraySegment<T>, Int32, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového segmentu pole začínající na zadané pozici se zadanou délkou.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(ArraySegment<T> segment, int start, int length);
public static Memory<T> AsMemory<T> (this ArraySegment<T> segment, int start, int length);
static member AsMemory : ArraySegment<'T> * int * int -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (segment As ArraySegment(Of T), start As Integer, length As Integer) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

segment
ArraySegment<T>

Cílový segment pole.

start
Int32

Index, ve kterém má začít paměť.

length
Int32

Počet položek v paměti.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Výjimky

segment je kovariantní a typ pole není přesně T[].

start, lengthnebolengthstart + není v rozsahu .segment

Poznámky

Vrátí hodnotu default , když segment je nullhodnota .

Platí pro

AsMemory<T>(T[], Int32, Int32)

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Vytvoří novou oblast paměti nad částí cílového pole začínající na zadané pozici se zadanou délkou.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static Memory<T> AsMemory(cli::array <T> ^ array, int start, int length);
public static Memory<T> AsMemory<T> (this T[]? array, int start, int length);
public static Memory<T> AsMemory<T> (this T[] array, int start, int length);
static member AsMemory : 'T[] * int * int -> Memory<'T>
<Extension()>
Public Function AsMemory(Of T) (array As T(), start As Integer, length As Integer) As Memory(Of T)

Parametry typu

T

Typ pole.

Parametry

array
T[]

Cílové pole.

start
Int32

Index, od kterého má začít oblast paměti.

length
Int32

Počet položek v oblasti paměti.

Návraty

Reprezentace paměti celého pole nebo jeho části.

Výjimky

array je kovariantní a typ pole není přesně T[].

start, lengthnebolengthstart + není v rozsahu .array

Poznámky

Vrátí hodnotu default , když array je nullhodnota .

Platí pro