## MemoryStream::TryGetBuffer method


返回创建此流时使用的无符号字节数组。

```cpp
bool System::IO::MemoryStream::TryGetBuffer(ArraySegment<uint8_t> &buffer)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| 缓冲区 | ArraySegment\<uint8_t\>\& | 字节数组 - 输出参数。当此方法返回 true 时，为创建此流的字节数组段；当此方法返回 false 时，此参数被设为默认值。 |

### ReturnValue

如果转换成功则为 True。

## 另见

* Class [ArraySegment](../../../system/arraysegment/)
* Class [MemoryStream](../)
* Namespace [System::IO](../../)
* Library [Aspose.Page for C++](../../../)
