always forget that linq First() accepts delegate.

This commit is contained in:
morkt
2016-03-07 19:07:16 +04:00
parent 9beff31fee
commit 977d4f215f
3 changed files with 3 additions and 3 deletions

View File

@@ -658,7 +658,7 @@ namespace GARbro.GUI
items = items.Skip (start_index).Concat (items.Take (start_index));
}
string input = m_current_input.Phrase.ToString();
var matched = items.Where (e => e.Name.StartsWith (input, StringIgnoreCase)).FirstOrDefault();
var matched = items.FirstOrDefault (e => e.Name.StartsWith (input, StringIgnoreCase));
if (null != matched)
lv_SelectItem (matched);
else