try { var serializer = new JavaScriptSerializer(); serializer.RegisterConverters(new[] { new DynamicJsonConverter() }); dynamic obj = serializer.Deserialize(e.Result, typeof(object)); //int inputNumber = Int32.Parse(obj); for (dynamic i = 0; i <= obj ; i++) { dynamic nobj= obj[i]; dynamic nfn = nobj["Formatted Name"]; System.Windows.Forms.Label labelInput = new System.Windows.Forms.Label(); labelInput.Text = nfn + i; labelInput.Location = new Point(30, labelInput.Bottom + (i * 30)); labelInput.AutoSize = true; this.Controls.Add(labelInput); } catch (Exception ex) { }
int
array of objects.
for (int i = 0; i <= obj.Length; i++){...}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)