Refactor to use new C# language features (#1881)
* Use shorter default syntax * Inline out variable declarations * Pattern matching
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user