語言

ByteArrayContent 建構函式

定義

初始化 ByteArrayContent 類別的新執行個體。

多載

名稱 Description
ByteArrayContent(Byte[])

初始化 ByteArrayContent 類別的新執行個體。

ByteArrayContent(Byte[], Int32, Int32)

初始化 ByteArrayContent 類別的新執行個體。

ByteArrayContent(Byte[])

來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs

初始化 ByteArrayContent 類別的新執行個體。

public:
 ByteArrayContent(cli::array <System::Byte> ^ content);
public ByteArrayContent(byte[] content);
new System.Net.Http.ByteArrayContent : byte[] -> System.Net.Http.ByteArrayContent
Public Sub New (content As Byte())

參數

content
Byte[]

用於初始 ByteArrayContent化 . 的內容。

例外狀況

參數 content 為 null。

備註

該 ByteArrayContent 類別不會在內部複製所提供的位元組陣列,而是保留對該陣列的參考。 呼叫者在內容傳送前不應修改陣列中的資料。

適用於

ByteArrayContent(Byte[], Int32, Int32)

來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs
來源:
ByteArrayContent.cs

初始化 ByteArrayContent 類別的新執行個體。

public:
 ByteArrayContent(cli::array <System::Byte> ^ content, int offset, int count);
public ByteArrayContent(byte[] content, int offset, int count);
new System.Net.Http.ByteArrayContent : byte[] * int * int -> System.Net.Http.ByteArrayContent
Public Sub New (content As Byte(), offset As Integer, count As Integer)

參數

content
Byte[]

用於初始 ByteArrayContent化 . 的內容。

offset
Int32

用於初始化 content. 的參數中ByteArrayContent位移量(位元組)為單位。

count
Int32

從content初始化offset參數開始的ByteArrayContent位元組數。

例外狀況

參數 content 為 null。

參數 offset 小於零。

-或-

參數 offset 大於該參數所指定 content 的內容長度。

-或-

參數 count 小於零。

-或-

參數count大於參數指定content的內容長度減去參數。offset

備註

該 ByteArrayContent 類別不會在內部複製所提供的位元組陣列,而是保留對該陣列的參考。 呼叫者在內容傳送前不應修改陣列中的資料。

內容僅使用參數offsetcount所指定的範圍。

適用於