I have the following code in PCL,
string postData = JsonConvert.SerializeObject(deviceInfo);
using (var requestStream = await Task<Stream>.Factory.FromAsync(request.BeginGetRequestStream, request.EndGetRequestStream, request))
{
await requestStream.WriteAsync(Encoding.UTF8.GetBytes(postData), 0, postData.Length);
}
This code works well with WP8 but on android, it throws an error in VS output window list here:
Error while resolving expression: Value must be positive. Parameter name: count System.NotSupportedException: Specified method is not supported. at Mono.Debugging.Evaluation.TypeValueReference.get_Value() at Mono.Debugging.Evaluation.NRefactoryExpressionEvaluatorVisitor.VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression) at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor[T](IAstVisitor`1 visitor) at Mono.Debugging.Evaluation.NRefactoryExpressionEvaluator.Evaluate(EvaluationContext ctx, String expression, Object expectedType) at Mono.Debugging.Evaluation.ObjectValueAdaptor.GetExpressionValue(EvaluationContext ctx, String exp) Error while resolving expression: Value must be positive.
version is Xamarin.Android 4.10.01073 (d23a19bf).
Anyone can help?