UnmanagedMemoryAccessor.ReadArray<T>(Int64, T[], Int32, Int32) Metoda

Definicja

Odczytuje struktury typu T z metody dostępu do tablicy typu T.

public:
generic <typename T>
 where T : value class int ReadArray(long position, cli::array <T> ^ array, int offset, int count);
public int ReadArray<T> (long position, T[] array, int offset, int count) where T : struct;
[System.Security.SecurityCritical]
public int ReadArray<T> (long position, T[] array, int offset, int count) where T : struct;
member this.ReadArray : int64 * 'T[] * int * int -> int (requires 'T : struct)
[<System.Security.SecurityCritical>]
member this.ReadArray : int64 * 'T[] * int * int -> int (requires 'T : struct)
Public Function ReadArray(Of T As Structure) (position As Long, array As T(), offset As Integer, count As Integer) As Integer

Parametry typu

T

Typ struktury.

Parametry

position
Int64

Liczba bajtów w metodzie dostępu, w której należy rozpocząć odczytywanie.

array
T[]

Tablica zawierająca struktury odczytane z metody dostępu.

offset
Int32

Indeks, w array którym należy umieścić pierwszą skopiowaną strukturę.

count
Int32

Liczba struktur typu T do odczytu z metody dostępu.

Zwraca

Liczba struktur odczytanych w pliku array. Ta wartość może być mniejsza niż count w przypadku mniejszej liczby dostępnych struktur lub zera, jeśli osiągnięto koniec metody dostępu.

Atrybuty

Wyjątki

array nie jest wystarczająco duży, aby zawierać count struktury (począwszy od position).

array to null.

position jest mniejsza niż zero lub większa niż pojemność metody dostępu.

Akcesorium nie obsługuje odczytu.

Akcesorium zostało usunięte.

Uwagi

Ta metoda nie jest bezpieczna.

Dotyczy