Replaced ContainsKey and getting by value with TryGetValue method (#2013)
This commit is contained in:
committed by
James Newton-King
parent
279a041eeb
commit
eb372aaf56
@@ -129,7 +129,7 @@ namespace Newtonsoft.Json.Linq
|
||||
|
||||
if (_dictionary != null)
|
||||
{
|
||||
return _dictionary.ContainsKey(key) && Remove(_dictionary[key]);
|
||||
return _dictionary.TryGetValue(key, out JToken value) && Remove(value);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user