I have the following example string in string within an application C #:
string json={"success":56,"msg_error":"credenciales no reconocidas"}
That I receive a web service. What I need is to take the value of "success" and assign it to a variable for later use. I have tried with
var results = JsonConvert.DeserializeObject<dynamic>(json);
var id = results['success'];
if (id == 0){
MessageBox.Show("OK");
}else{
MessageBox.Show("Nada");
}
What is inside a button of a C # form, but the visual compiler detects an error that does not appear when looking for it. What am I doing wrong, or because I can not recognize myself?