1
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream respStream = response.GetResponseStream();
using (var sr = new StreamReader(respStream, Encoding.UTF8))
using (JsonReader reader = new JsonTextReader(sr))
{
JsonSerializer serializer = new JsonSerializer();
ServiceModel toReturn = serializer.Deserialize<ServiceModel>(reader);
String resps = JsonConvert.SerializeObject(toReturn, Formatting.Indented);
}
獲取內存溢出的例外在這條線之後:內存不足異常。 C#
String resps = JsonConvert.SerializeObject(toReturn, Formatting.Indented);
。
如何在C#(精簡框架)中處理此問題。