Refactor to use new C# language features (#1881)

* Use shorter default syntax
* Inline out variable declarations
* Pattern matching
This commit is contained in:
James Newton-King
2018-10-15 12:49:25 +13:00
committed by GitHub
parent 0c6b0748f8
commit 0ce23ff924
51 changed files with 340 additions and 416 deletions
@@ -1113,12 +1113,12 @@ namespace Newtonsoft.Json.Utilities
public override bool Equals(object obj)
{
if (!(obj is TypeNameKey))
if (!(obj is TypeNameKey key))
{
return false;
}
return Equals((TypeNameKey)obj);
return Equals(key);
}
public bool Equals(TypeNameKey other)