我有一个 WCF 服务返回字节 [] 数据。我如何在客户端读取这些数据
using GetrResponseStream();
HttpWebResponse resp = (HttpWebResponse)request.GetResponse();
if (resp.StatusCode == HttpStatusCode.OK)
{
Stream responseStream = resp.GetResponseStream();
if (responseStream != null)
{
var reader = new StreamReader(responseStream, Encoding.UTF8);
string dataString = reader.ReadToEnd();
}
}
使用此代码我得到
dataString ={"[255,34,56,778,3,54,6,8,9,90,0,87,6,.....]"}
但我想byte[]
由那个 WCF 服务返回,即我想要
byte[] dataString =[255,34,56,778,3,54,6,8,9,90,0,87,6,.....];