mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-11 12:14:53 +08:00
Severity Code Description Project File Line Suppression State
Warning CA1307 The behavior of 'string.IndexOf(string)' could vary based on the current user's locale settings. Replace this call in 'PowerLauncher.MainWindow.ListView_FirstItem(string)' with a call to 'string.IndexOf(string, System.StringComparison)'. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\MainWindow.xaml.cs 269 Active
This commit is contained in:
parent
849ce04def
commit
6890561723
@ -277,7 +277,7 @@ namespace PowerLauncher
|
|||||||
int selectedIndex = _viewModel.Results.SelectedIndex;
|
int selectedIndex = _viewModel.Results.SelectedIndex;
|
||||||
if (selectedItem != null && selectedIndex == 0)
|
if (selectedItem != null && selectedIndex == 0)
|
||||||
{
|
{
|
||||||
if (selectedItem.IndexOf(input) == 0)
|
if (selectedItem.IndexOf(input, StringComparison.InvariantCultureIgnoreCase) == 0)
|
||||||
{
|
{
|
||||||
return selectedItem;
|
return selectedItem;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user