From 5d1c3e6d2d64dc0dc9de210fa91fa982ebfc4d8b Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Wed, 23 Aug 2023 20:00:01 -0400 Subject: [PATCH] ArgumentNullException.ThrowIfNull in Helper --- src/settings-ui/Settings.UI.Library/Utilities/Helper.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs b/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs index 23050b31ed..b0e4a9b620 100644 --- a/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs +++ b/src/settings-ui/Settings.UI.Library/Utilities/Helper.cs @@ -114,11 +114,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Utilities { // Split up the version strings into int[] // Example: v10.0.2 -> {10, 0, 2}; - if (version1 == null) - { - throw new ArgumentNullException(nameof(version1)); - } - else ArgumentNullException.ThrowIfNull(version2); + ArgumentNullException.ThrowIfNull(version1); + ArgumentNullException.ThrowIfNull(version2); var v1 = version1.Substring(1).Split('.').Select(int.Parse).ToArray(); var v2 = version2.Substring(1).Split('.').Select(int.Parse).ToArray();