From 51d0cedb298e1cb4b6145fd2b006b0b1d9740711 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:09:59 -0700 Subject: [PATCH] Fix for: Warning CA1806 Main calls TryParse but does not explicitly check whether the conversion succeeded. Either use the return value in a conditional statement or verify that the call site expects that the out argument will be set to the default value when the conversion fails. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\App.xaml.cs 45 Active --- src/modules/launcher/PowerLauncher/App.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 2abace0c45..9a714082d7 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -42,7 +42,7 @@ namespace PowerLauncher { if (args?.Length > 0) { - int.TryParse(args[0], out _powerToysPid); + _ = int.TryParse(args[0], out _powerToysPid); } using (var application = new App())