From b6c8cfc28b2c94e6dc3cb07d3058371dd6775e70 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 6 Apr 2022 18:24:59 -0400 Subject: simplify 'is not' patterns --- src/SMAPI/Framework/Events/ManagedEventHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/Events') diff --git a/src/SMAPI/Framework/Events/ManagedEventHandler.cs b/src/SMAPI/Framework/Events/ManagedEventHandler.cs index 28e88be0..97040f76 100644 --- a/src/SMAPI/Framework/Events/ManagedEventHandler.cs +++ b/src/SMAPI/Framework/Events/ManagedEventHandler.cs @@ -42,7 +42,7 @@ namespace StardewModdingAPI.Framework.Events /// public int CompareTo(object obj) { - if (!(obj is ManagedEventHandler other)) + if (obj is not ManagedEventHandler other) throw new ArgumentException("Can't compare to an unrelated object type."); int priorityCompare = -this.Priority.CompareTo(other.Priority); // higher value = sort first -- cgit