From 6ea181c286784d9d699d515be111d41d76a4c4fb Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Thu, 18 Jun 2020 08:43:58 -0700 Subject: [PATCH] Fix for: Warning CA1820 Test for empty strings using 'string.Length' property or 'string.IsNullOrEmpty' method instead of an Equality check. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\MainWindow.xaml.cs 291 Active --- src/modules/launcher/PowerLauncher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index 186987da74..e4079c4f80 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -299,7 +299,7 @@ namespace PowerLauncher else { var text = ((TextBox)sender).Text; - if (text == string.Empty) + if (string.IsNullOrEmpty(text)) { SearchBox.AutoCompleteTextBlock.Text = string.Empty; }