UnmanagedMemoryAccessor.Read<T>(Int64, T) Método

Definição

Lê uma estrutura do tipo T do acessador em uma referência fornecida.Reads a structure of type T from the accessor into a provided reference.

public:
generic <typename T>
 where T : value class void Read(long position, [Runtime::InteropServices::Out] T % structure);
public void Read<T> (long position, out T structure) where T : struct;
[System.Security.SecurityCritical]
public void Read<T> (long position, out T structure) where T : struct;
member this.Read : int64 * 'T -> unit (requires 'T : struct)
[<System.Security.SecurityCritical>]
member this.Read : int64 * 'T -> unit (requires 'T : struct)
Public Sub Read(Of T As Structure) (position As Long, ByRef structure As T)

Parâmetros de tipo

T

O tipo de estrutura.The type of structure.

Parâmetros

position
Int64

A posição no acessador na qual a leitura começará.The position in the accessor at which to begin reading.

structure
T

A estrutura para conter os dados lidos.The structure to contain the read data.

Atributos

Exceções

Não há bytes suficiente após position a serem lidos em uma estrutura do tipo T.There are not enough bytes after position to read in a structure of type T.

- ou --or- T é um tipo de valor que contém um ou mais tipos de referência.T is a value type that contains one or more reference types.

position é menor que zero ou maior que a capacidade do acessador.position is less than zero or greater than the capacity of the accessor.

O acessador não dá suporte à leitura.The accessor does not support reading.

O acessador foi descartado.The accessor has been disposed.

Comentários

Use este método para ler estruturas médias para grandes que não são facilmente acomodadas por outros métodos de leitura nessa classe.Use this method to read medium to large structures that are not easily accommodated by the other read methods in this class.

Aplica-se a