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