UnmanagedMemoryAccessor.Read<T>(Int64, T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將型別 T
的結構從存取子讀入至提供的參考。
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)
類型參數
- T
結構的型別。
參數
- position
- Int64
要在存取子中開始讀取的位置。
- structure
- T
包含讀取資料的結構。
- 屬性
例外狀況
position
小於零或大於這個存取子的容量。
存取子不支援讀取。
存取子已經被處置。
備註
使用這個方法可讀取此類別中其他讀取方法無法輕易容納的中型到大型結構。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應