ByteArrayContent 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 ByteArrayContent 类的新实例。
重载
| ByteArrayContent(Byte[]) |
初始化 ByteArrayContent 类的新实例。 |
| ByteArrayContent(Byte[], Int32, Int32) |
初始化 ByteArrayContent 类的新实例。 |
ByteArrayContent(Byte[])
- Source:
- ByteArrayContent.cs
- Source:
- ByteArrayContent.cs
- Source:
- 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)
- Source:
- ByteArrayContent.cs
- Source:
- ByteArrayContent.cs
- Source:
- 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 中从用于初始化 ByteArrayContent 的 offset 参数开始的字节数。
例外
content 参数为 null。
offset 参数小于零。
或
offset 参数大于 content 参数指定的内容的长度。
或
count 参数小于零。
或
count 参数大于由 content 参数减去 offset 参数所指定的内容长度。
注解
类 ByteArrayContent 不会在内部复制提供的字节数组,而是保留对它的引用。 在发送内容之前,调用方不应修改数组中的数据。
仅参数 offset 和 count 参数指定的范围用作内容。