private async void button2_Click(object sender, EventArgs e) { string jsonString = await service.GetStringAsync(new Uri("http://localhost:55482/EquationGeneratorService.svc/equation/"+operation+"/"+level)); DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(Equation)); currentEquation = (Equation)jsonSerializer.ReadObject(new MemoryStream(Encoding.Unicode.GetBytes(jsonString))); Console.WriteLine(jsonString + currentEquation.Result); label1.Text = currentEquation.LeftHandSide; button1.Enabled = true; textBox1.Enabled = true; }