Merge checks

This commit is contained in:
Cinder
2021-12-09 13:53:36 -06:00
parent eec209d8b8
commit 164e40420d
11 changed files with 59 additions and 84 deletions

View File

@@ -122,18 +122,16 @@ namespace LitJson
#region IDictionary Indexer
object IDictionary.this[object key] {
get {
return EnsureDictionary ()[key];
}
get => EnsureDictionary ()[key];
set {
if (! (key is String))
if (! (key is string str))
throw new ArgumentException (
"The key has to be a string");
JsonData data = ToJsonData (value);
this[(string) key] = data;
this[str] = data;
}
}
#endregion