文字列のリスト (_authorizedBks) から辞書のリスト (tr) を検索しようとしているこのコードのパフォーマンスを改善できますか。これを C# または .NET のサポート言語でコーディングするより良い方法はありますか?
for (int i = tr.Count - 1; i >= 0; i--)
{
if (tr[i].ContainsKey("BK") && !_authorizedBks.Contains(tr[i]["BK"], StringComparer.CurrentCultureIgnoreCase))
{
removedBks.Add(tr[i]);
}
}
// where tr is List<Dictionary<string, string>>
// _authorizedBks is List<string>
// removedBks is List<Dictionary<string, string>>