这是我的代码..
var signUpData = new
{
first = "abcd",
last ="efgh",
email ="sometext",
password = "sometext",
phone = contactSession.ContactNumber,
dialing_code = "some",
country = "some"
};
JsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(signUpData);
var tcs = new TaskCompletionSource<Tuple<string, bool>>();
tcs.SetResult(new Tuple<string, bool>(request.ResponseBody,false));//request.ResponseBody is jsonbody that comes from server.
var result = await tcs.Task;
if (result.Item2 == false)
{
var errors = JsonConvert.DeserializeAnonymousType(result.Item1, new { error = "" });
return false;
}
然后我有时并非总是犯错误。
情景是什么?
谁能说出来?`