Esempio n. 1
0
    public void IListGenericAdd()
    {
      IList<JToken> t = new JProperty("error", new List<string> {"one", "two"});

      ExceptionAssert.Throws<JsonException>(
        "Newtonsoft.Json.Linq.JProperty cannot have multiple values.",
        () =>
          {
            t.Add(1);
          });
    }
 public void IListGenericAdd()
 {
   IList<JToken> t = new JProperty("error", new List<string> { "one", "two" });
   t.Add(1);
   t.Add(2);
 }