Stream.ValidateBufferArguments(Byte[], Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
驗證提供給讀取與寫入方法的 Stream參數。
protected:
static void ValidateBufferArguments(cli::array <System::Byte> ^ buffer, int offset, int count);
protected static void ValidateBufferArguments(byte[] buffer, int offset, int count);
static member ValidateBufferArguments : byte[] * int * int -> unit
Protected Shared Sub ValidateBufferArguments (buffer As Byte(), offset As Integer, count As Integer)
參數
- buffer
- Byte[]
陣列的「緩衝區」參數會傳遞給讀取或寫入方法。
- offset
- Int32
整數「偏移」參數傳遞給讀取或寫入方法。
- count
- Int32
整數「計數」參數傳遞給讀取或寫入方法。
例外狀況
buffer 是 null。
offset超出 的範圍buffer,或count為負值,或是由 與 count 的組合offset所指定的範圍,超過了 的buffer長度。