can't seem local variable in local scope
cann't watch local variable's value
private byte[] sizeBytes;
public async Task<string> ReceiveStream()
{
byte[] responseBytes;
string response=null;
try
{
await m_dataReader.LoadAsync(4);
sizeBytes=new byte[4];
m_dataReader.ReadBytes(sizeBytes);
int len = int.Parse(Encoding.ASCII.GetString(sizeBytes)) ;
// 读内容
responseBytes = new byte[len];
m_dataReader.UnicodeEncoding=UnicodeEncoding.Utf8;
await m_dataReader.LoadAsync((uint)len);
response= m_dataReader.ReadString(m_dataReader.UnconsumedBufferLength);
Debug.Log(response.Length);
Debug.Log(response);
}
catch (Exception e)
{
throw e;
}
return response; //返回response
}
代码在上面,在监视视图中只能看到成员变量。 这是Unity3D的UWP项目导出。