UnmanagedMemoryAccessor.Read<T>(Int64, T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
Type Parameters
- T
The type of structure.
Parameters
- position
- Int64
The position in the accessor at which to begin reading.
- structure
- T
The structure to contain the read data.
- Attributes
Exceptions
There are not enough bytes after position
to read in a structure of type T
.
-or-
T
is a value type that contains one or more reference types.
position
is less than zero or greater than the capacity of the accessor.
The accessor does not support reading.
The accessor has been disposed.
Remarks
Use this method to read medium to large structures that are not easily accommodated by the other read methods in this class.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor