Compartilhar via


Método SafeBuffer.Read<T> (UInt64)

 

Dica

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Lê um tipo de valor na memória no deslocamento especificado.

Esta API não é compatível com CLS.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (em mscorlib.dll)

Sintaxe

[CLSCompliantAttribute(false)]
public T Read<T>(
    ulong byteOffset
)
where T : struct
public:
generic<typename T>
where T : value struct, gcnew()
[CLSCompliantAttribute(false)]
T Read(
    unsigned long long byteOffset
)
[<CLSCompliantAttribute(false)>]
member Read<'T when 'T : struct> : 
        byteOffset:uint64 -> 'T
<CLSCompliantAttribute(False)>
Public Function Read(Of T As Structure) (
    byteOffset As ULong
) As T

Parâmetros

  • byteOffset
    Type: System.UInt64

    O local do qual o tipo de valor será lido. Talvez seja necessário considerar problemas de alinhamento.

Valor Retornado

Type: T

O tipo de valor que foi lido na memória.

Parâmetros de Tipo

  • T
    O tipo de valor para leitura.

Exceções

Exception Condition
InvalidOperationException

O método Initialize não foi chamado.

Informações de Versão

Plataforma Universal do Windows
Disponível desde 8
.NET Framework
Disponível desde 4.0
Biblioteca de Classes Portátil
Com suporte no: plataformas portáteis do .NET
Windows Phone
Disponível desde 8.1

Confira Também

Write<T>
Classe SafeBuffer
Namespace System.Runtime.InteropServices

Retornar ao início