[NamesList] - Combine two collection using AddRange.

This commit is contained in:
Ivandro Ismael 2016-03-27 15:32:16 +01:00
parent 694376f154
commit 33f5155700

View File

@ -49,15 +49,9 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
public List<string> GetAllNames() public List<string> GetAllNames()
{ {
var list = new List<string>(); var list = new List<string>(_namesList.Count + _namesMultiList.Count);
foreach (var name in _namesList) list.AddRange(_namesList);
{ list.AddRange(_namesMultiList);
list.Add(name);
}
foreach (var name in _namesMultiList)
{
list.Add(name);
}
return list; return list;
} }