-Added set indexer to JToken

This commit is contained in:
JamesNK
2009-09-18 21:38:50 +00:00
parent 379c3ce09b
commit fac4f481b3
8 changed files with 150 additions and 0 deletions
+9
View File
@@ -161,6 +161,15 @@ namespace Newtonsoft.Json.Linq
return GetItem((int)key);
}
set
{
ValidationUtils.ArgumentNotNull(key, "o");
if (!(key is int))
throw new ArgumentException("Set JConstructor values with invalid key value: {0}. Argument position index expected.".FormatWith(CultureInfo.InvariantCulture, MiscellaneousUtils.ToString(key)));
SetItem((int)key, value);
}
}
internal override int GetDeepHashCode()