Método SafeBuffer.Write<T> (UInt64, T)
Dica
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.
Grava um tipo de valor na memória no local determinado.
Esta API não é compatível com CLS.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (em mscorlib.dll)
Sintaxe
[CLSCompliantAttribute(false)]
public void Write<T>(
ulong byteOffset,
T value
)
where T : struct
public:
generic<typename T>
where T : value struct, gcnew()
[CLSCompliantAttribute(false)]
void Write(
unsigned long long byteOffset,
T value
)
[<CLSCompliantAttribute(false)>]
member Write<'T when 'T : struct> :
byteOffset:uint64 *
value:'T -> unit
<CLSCompliantAttribute(False)>
Public Sub Write(Of T As Structure) (
byteOffset As ULong,
value As T
)
Parâmetros
byteOffset
Type: System.UInt64O local no qual a gravação será iniciada. Talvez seja necessário considerar problemas de alinhamento.
value
Type: TO valor a ser gravado.
Parâmetros de Tipo
- T
O tipo de valor para gravação.
Exceções
Exception | Condition |
---|---|
InvalidOperationException | O método Initialize não foi chamado. |
Comentários
Esse método é equivalente ao seguinte código:
*(T*)(bytePtr + byteOffset) = value;
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
Read<T>
Classe SafeBuffer
Namespace System.Runtime.InteropServices
Retornar ao início