gpt4 book ai didi

c# - 如何将字节数组转换为 Stream

转载 作者:IT王子 更新时间:2023-10-29 03:39:21 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How do I convert byte[] to stream in C#?

我需要将字节数组转换为 Stream。如何在 C# 中执行此操作?

它在 asp.net 应用程序中。

文件上传控件名称:taxformUpload

程序

byte[] buffer = new byte[(int)taxformUpload.FileContent.Length];
taxformUpload.FileContent.Read(buffer, 0, buffer.Length);

Stream stream = ConvertToStream(buffer);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com